Skip to content

Commit

Permalink
Merge pull request #3 from AtomicJon/master
Browse files Browse the repository at this point in the history
Migrate to TypeScript and upgrade all dependencies
  • Loading branch information
AtomicJon authored Feb 14, 2021
2 parents df02e31 + bae2160 commit 0bea881
Show file tree
Hide file tree
Showing 9 changed files with 2,548 additions and 1,852 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"es6": true,
"jest": true
},
"extends": ["eslint:recommended", "airbnb-base"],
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
},
Expand Down
7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// eslint-disable-next-line no-undef
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-typescript',
],
};
37 changes: 22 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@super-effective/colorutils",
"version": "1.1.1",
"version": "2.0.0",
"description": "A color utility to help with converting between formats and getting color details",
"keywords": [
"color",
Expand All @@ -11,10 +11,11 @@
],
"main": "dist/colorutils.js",
"module": "dist/colorutils.es.js",
"types": "dist/colorutils.d.ts",
"files": [
"dist"
],
"source": "src/colorutils.js",
"source": "src/colorutils.ts",
"repository": "git@github.com:super-effective/colorutils.git",
"author": "SuperEffective <hello@wearesupereffective.com>",
"license": "MIT",
Expand All @@ -26,19 +27,25 @@
"coverage": "jest --coverage"
},
"devDependencies": {
"@babel/core": "^7.8.7",
"@babel/preset-env": "^7.8.7",
"@rollup/plugin-babel": "^5.0.4",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.1",
"jest": "^25.1.0",
"rollup": "^2.18.0",
"rollup-plugin-includepaths": "^0.2.3"
"@babel/core": "^7.12.16",
"@babel/preset-env": "^7.12.16",
"@babel/preset-typescript": "^7.12.16",
"@rollup/plugin-babel": "^5.2.3",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.1.1",
"@types/jest": "^26.0.20",
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"babel-jest": "^26.6.3",
"eslint": "^7.20.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"jest": "^26.6.3",
"rollup": "^2.39.0",
"rollup-plugin-includepaths": "^0.2.4",
"rollup-plugin-typescript2": "^0.29.0",
"tslib": "^2.1.0",
"typescript": "^4.1.5"
},
"babel": {
"presets": [
Expand Down
5 changes: 3 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable import/no-extraneous-dependencies */
import babel from '@rollup/plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import includePaths from 'rollup-plugin-includepaths';
import typescript from 'rollup-plugin-typescript2';

const packageJson = require('./package.json');

export default {
input: './src/colorutils.js',
input: './src/colorutils.ts',

output: [
{
Expand All @@ -23,6 +23,7 @@ export default {
],

plugins: [
typescript(),
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**',
Expand Down
Loading

0 comments on commit 0bea881

Please sign in to comment.