Skip to content

Commit

Permalink
fix: move code to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroreisvieira committed Feb 13, 2020
1 parent 9044e8c commit f419a0f
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 80 deletions.
16 changes: 12 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"presets": ["es2015"],
"plugins": [
["babel-root-import"]
]
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"browsers": ["ie >= 9", "last 2 versions", "safari >= 7"]
},
"loose": true
}
]
]
}
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"rules": {},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": ["eslint:recommended"],
"env": {
"browser": true
}
}
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

10 changes: 1 addition & 9 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
# These are supported funding model platforms

github: [mauroreisvieira]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with a single custom sponsorship URL
patreon: mauroreisvieira
2 changes: 2 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*eslint-disable no-undef */
module.exports = { extends: ["@commitlint/config-conventional"] };
91 changes: 49 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,51 @@
{
"name": "sublime-meetio-theme",
"version": "3.2.0",
"description": "The most powerful and adaptive theme for Sublime Text 3",
"bugs": {
"url": "https://github.com/meetio-theme/sublime-meetio-theme/issues"
},
"author": "Mauro Reis Vieira <mauroreisvieira@gmail.com>",
"license": "MIT",
"keywords": [
"sublime-text",
"scheme",
"theme"
],
"scripts": {
"build:themes": "node src/themes.js",
"build:schemes": "node src/schemes.js",
"build:icons": "node src/icons.js",
"lint": "eslint \"*.js\" \"src/*.js\" \"src/**/*.js\" \"src/**/**/*.js\" \"src/**/*.json\" \"src/**/**/*.json\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": ">=6.0.0"
},
"devDependencies": {
"@meetio/meetio-colors": "^1.0.3",
"@meetio/meetio-icons": "^1.3.0",
"@meetio/scheme-generator": "^0.1.0",
"babel-core": "^6.14.0",
"babel-eslint": "^10.0.1",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"babel-root-import": "^4.1.8",
"eslint": "^5.12.1",
"eslint-config-eslint": "^5.0.1",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-json": "^1.3.2",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"prettier": "^1.15.3",
"rimraf": "^3.0.0",
"svg2img": "^0.6.1"
}
"name": "sublime-meetio-theme",
"version": "3.2.0",
"description": "The most powerful and adaptive theme for Sublime Text 3",
"bugs": {
"url": "https://github.com/meetio-theme/sublime-meetio-theme/issues"
},
"author": "Mauro Reis Vieira <mauroreisvieira@gmail.com>",
"license": "MIT",
"keywords": [
"sublime-text",
"scheme",
"theme"
],
"scripts": {
"build:theme": "tsc src/theme.ts",
"build:schemes": "tsc src/scheme.ts",
"build:icons": "node src/icons.js",
"lint": "eslint \"*.js\" \"src/*.js\" \"src/**/*.js\" \"src/**/**/*.js\" \"src/**/*.json\" \"src/**/**/*.json\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": ">=6.0.0"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"dependencies": {
"@types/node": "^13.7.1"
},
"devDependencies": {
"@babel/core": "7.4.5",
"@babel/preset-env": "7.4.5",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@meetio/meetio-colors": "^1.0.3",
"@meetio/meetio-icons": "^1.3.0",
"@meetio/scheme-generator": "^0.1.0",
"@typescript-eslint/eslint-plugin": "2.15.0",
"@typescript-eslint/parser": "2.15.0",
"babel-eslint": "^10.0.3",
"eslint": "6.8.0",
"husky": "^4.2.1",
"prettier": "^1.18.2",
"rimraf": "^3.0.0",
"svg2img": "^0.6.1",
"typescript": "^3.7.2"
}
}
2 changes: 1 addition & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module.exports = {
trailingComma: "es5",
tabWidth: 4,
semi: true,
singleQuote: false,
singleQuote: true,
};
23 changes: 23 additions & 0 deletions src/scheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use strict";
exports.__esModule = true;
var scheme_generator_1 = require("@meetio/scheme-generator");
var pallete = require("@meetio/meetio-colors/theme/index");
[
{
name: 'Meetio-Theme-Dark',
author: 'Mauro Reis Vieira <mauroreisvieira@gmail.com>',
variables: pallete.dark
},
{
name: 'Meetio-Theme-Light',
author: 'Mauro Reis Vieira <mauroreisvieira@gmail.com>',
variables: pallete.light
},
].map(function (item) {
var settings = {
colors: item.variables,
rules: []
};
console.log(item.name);
scheme_generator_1.generateScheme(item.name, item.author, item.name, settings, 'schemes');
});
21 changes: 21 additions & 0 deletions src/scheme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { generateScheme, ISchemeSetting } from '@meetio/scheme-generator';
import * as pallete from '@meetio/meetio-colors/theme/index';

[
{
name: 'Meetio-Theme-Dark',
author: 'Mauro Reis Vieira <mauroreisvieira@gmail.com>',
variables: pallete.dark,
},
{
name: 'Meetio-Theme-Light',
author: 'Mauro Reis Vieira <mauroreisvieira@gmail.com>',
variables: pallete.light,
},
].map(item => {
const settings: ISchemeSetting = {
colors: item.variables,
rules: [],
};
generateScheme(item.name, item.author, item.name, settings, 'schemes');
});
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"target": "es6",
"outDir": "dist",
"lib": ["es7", "dom"],
"esModuleInterop": true,
"sourceMap": true,
"allowUnreachableCode": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": true,
"resolveJsonModule": true
},
"include": ["src/index.ts"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit f419a0f

Please sign in to comment.