Skip to content

Commit

Permalink
fix: move to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroreisvieira committed Apr 1, 2020
1 parent f47a3e6 commit e4b285c
Show file tree
Hide file tree
Showing 17 changed files with 148 additions and 80 deletions.
17 changes: 17 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"presets": [
[
"@babel/preset-env", {
"modules": false,
"targets": {
"browsers": [
"ie >= 9",
"last 2 versions",
"safari >= 7"
]
},
"loose": true
}
]
]
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = 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
}
}
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

26 changes: 15 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Folders
node_modules/
# macOS filesystem
.DS_Store
Thumbs.db

# Files In Folders
schemes/*.chback
# Editors and IDEs
.sublime/

# Files
*.sublime-project
*.sublime-workspace
package-lock.json
# Generated folders
node_modules/
.rpt2_cache
dist/
demo/*.js

# Other
.DS_Store
*.cache
# Generated files
package-lock.json
npm-debug
yarn.lock
yarn-error.log
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Mauro Reis Vieira
Copyright (c) 2020 Mauro Reis Vieira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ $ yarn add @meetio/meetio-colors
| `Purple` | ![#7c4dff](https://placehold.it/30x24/7c4dff/000000?text=%20) `#7c4dff` | ![#c2afff](https://placehold.it/30x24/c2afff/000000?text=%20) `#c2afff` |
| `Red` | ![#e53935](https://placehold.it/30x24/e53935/000000?text=%20) `#e53935` | ![#d95757](https://placehold.it/30x24/d95757/000000?text=%20) `#d95757` |
| `Yellow` | ![#f3ad2c](https://placehold.it/30x24/f3ad2c/000000?text=%20) `#f3ad2c` | ![#ffcb6b](https://placehold.it/30x24/ffcb6b/000000?text=%20) `#ffcb6b` |
| `Deprecated` | ![#ffc777a1](https://placehold.it/30x24/ffc777a1/000000?text=%20) `#ffc777a1` | ![#ffc777a1](https://placehold.it/30x24/ffc777a1/000000?text=%20) `#ffc777a1` |
| `Invalid` | ![#d3423e66](https://placehold.it/30x24/d3423e66/000000?text=%20) `#d3423e66` | ![#d46c6c66](https://placehold.it/30x24/d46c6c66/000000?text=%20) `#d46c6c66` |
| `Diff Added` | ![#9ccc65](https://placehold.it/30x24/9ccc65/000000?text=%20) `#9ccc65` | ![#9ccc65](https://placehold.it/30x24/9ccc65/000000?text=%20) `#9ccc65` |
| `Diff Modified` | ![#e2b93d](https://placehold.it/30x24/e2b93d/000000?text=%20) `#e2b93d` | ![#e2b93d](https://placehold.it/30x24/e2b93d/000000?text=%20) `#e2b93d` |
| `Diff Deleted` | ![#ef5350](https://placehold.it/30x24/ef5350/000000?text=%20) `#ef5350` | ![#ef5350](https://placehold.it/30x24/ef5350/000000?text=%20) `#ef5350` |

1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
8 changes: 0 additions & 8 deletions dist/index.js

This file was deleted.

21 changes: 0 additions & 21 deletions dist/variations/light.js

This file was deleted.

29 changes: 22 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,31 @@
"author": "Mauro Reis Vieira <mauroreisvieira@gmail.com>",
"license": "MIT",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"lint": "eslint *.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"devDependencies": {
"prettier": "^1.15.3",
"eslint": "^5.12.1",
"eslint-config-eslint": "^5.0.1",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"rimraf": "^3.0.0"
"@babel/core": "7.4.5",
"@babel/preset-env": "7.4.5",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@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",
"ts-node": "^8.6.2",
"typescript": "^3.7.2"
},
"dependencies": {
"@types/node": "^13.7.1"
}
}
7 changes: 3 additions & 4 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*eslint-disable no-undef */
module.exports = {
tailingComma: "all",
trailingComma: "es5",
tabWidth: 4,
semi: false,
singleQuote: false
semi: true,
singleQuote: true
}
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { light } from "./variations/light"
export { dark } from "./variations/dark"
20 changes: 20 additions & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export interface IColors {
cursor: string;
foreground: string;
background: string;
comments: string;
blue: string;
brown: string;
cyan: string;
green: string;
orange: string;
pink: string;
purple: string;
red: string;
yellow: string;
invalid: string;
deprecated: string;
diffAdded: string;
diffModified: string;
diffDeleted: string;
}
9 changes: 5 additions & 4 deletions dist/variations/dark.js → src/variations/dark.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*eslint-disable no-undef */
module.exports = {
import { IColors } from "./../interfaces"

export const dark: IColors = {
cursor: "#ffcc00",
foreground: "#dedfe4",
background: "#011627",
Expand All @@ -13,9 +14,9 @@ module.exports = {
purple: "#c2afff",
red: "#d95757",
yellow: "#ffcb8b",
deprecated: "#ffc777a1",
invalid: "#d46c6c66",
diffAdded: "#addb67",
diffModified: "#e2b93d",
diffDeleted: "#ef5350",
diffDeleted: "#ef5350"
}

22 changes: 22 additions & 0 deletions src/variations/light.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { IColors } from "./../interfaces"

export const light: IColors = {
cursor: '#7e57c2',
foreground: '#455A64',
background: '#fbfbfb',
comments: '#90a4ae',
blue: '#6182b8',
brown: '#bc5454',
cyan: '#5fb3b3',
green: '#91b859',
orange: '#f76d47',
pink: '#ff5370',
purple: '#7c4dff',
red: '#e53935',
yellow: '#f3ad2c',
deprecated: '#ffc777a1',
invalid: '#d3423e66',
diffAdded: '#9ccc65',
diffModified: '#e2b93d',
diffDeleted: '#ef5350',
};
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/*.ts"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit e4b285c

Please sign in to comment.