Skip to content

Commit 7570035

Browse files
authored
Merge pull request #17 from thgreasi/babel-7
feat: upgrade the implementation to support babel 7
2 parents 8a803b8 + d4f743c commit 7570035

File tree

39 files changed

+1284
-754
lines changed

39 files changed

+1284
-754
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"presets": [
3-
"es2015"
3+
"@babel/preset-env"
44
],
55
"plugins": [
6-
"syntax-dynamic-import"
6+
"@babel/plugin-syntax-dynamic-import"
77
]
88
}

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
test/fixtures

.jscsrc

Lines changed: 0 additions & 31 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 32 deletions
This file was deleted.

.lintstagedrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"{src, test}/**/*.js": [
3+
"prettier --config .prettierrc --write",
4+
"eslint --fix",
5+
"git add"
6+
]
7+
}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"parser": "babel",
3+
"singleQuote": true,
4+
"trailingComma": "all"
5+
}

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
language: node_js
22
node_js:
3-
- 4
4-
- 5
5-
- 6
3+
- 8
4+
- 10

package.json

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
"description": "Babel plugin that replaces System.import with the equivalent UMD pattern",
55
"main": "dist/index.js",
66
"scripts": {
7-
"test": "npm run-script build && node test",
7+
"clean": "rimraf build",
8+
"build": "npm run clean && ./node_modules/.bin/babel src --out-dir dist",
9+
"eslint": "eslint src test",
10+
"eslint-fix": "eslint src test --fix",
11+
"prettify": "prettier --config .prettierrc --write \"src/**/*.js\" \"test/**/*.js\"",
12+
"catch-unprettified": "npm run prettify -- --check",
13+
"lint": "npm run catch-unprettified && npm run eslint",
14+
"test": "npm run build && npm run lint && node test",
815
"watch": "node test --watch",
9-
"build": "./node_modules/.bin/babel src --out-dir dist",
10-
"prepublish": "./node_modules/.bin/babel src --out-dir dist"
16+
"prepack": "npm run build"
1117
},
1218
"author": "Thodoris Greasidis",
1319
"license": "MIT",
@@ -28,18 +34,30 @@
2834
},
2935
"homepage": "https://github.com/thgreasi/babel-plugin-system-import-transformer",
3036
"devDependencies": {
31-
"babel-cli": "^6.14.0",
32-
"babel-core": "^6.14.0",
33-
"babel-plugin-transform-runtime": "^6.15.0",
34-
"babel-preset-es2015": "^6.14.0",
35-
"babel-register": "^6.14.0",
37+
"@babel/cli": "^7.0.0",
38+
"@babel/core": "^7.0.0",
39+
"@babel/plugin-transform-runtime": "^7.0.0",
40+
"@babel/preset-env": "^7.0.0",
41+
"@babel/register": "^7.0.0",
42+
"babel-eslint": "^10.0.1",
3643
"chalk": "^1.1.3",
3744
"clear": "0.0.1",
3845
"diff": "^2.2.3",
39-
"js-beautify": "^1.6.2",
46+
"eslint": "^5.13.0",
47+
"eslint-config-standard": "^12.0.0",
48+
"eslint-plugin-import": "^2.16.0",
49+
"eslint-plugin-node": "^8.0.1",
50+
"eslint-plugin-promise": "^4.0.1",
51+
"eslint-plugin-standard": "^4.0.0",
52+
"husky": "^1.3.1",
53+
"lint-staged": "^8.1.3",
54+
"prettier": "~1.16.4",
55+
"rimraf": "^2.6.3",
4056
"watch": "^0.18.0"
4157
},
4258
"dependencies": {
43-
"babel-plugin-syntax-dynamic-import": "^6.18.0"
59+
"@babel/core": "^7.0.0",
60+
"@babel/helper-plugin-utils": "^7.0.0",
61+
"@babel/plugin-syntax-dynamic-import": "^7.0.0"
4462
}
4563
}

0 commit comments

Comments
 (0)