Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Upgrade to babel6 and enable some presets. #507

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["react", "es2015", "es2016", "es2017", "stage-0"],
"plugins": ["transform-runtime"]
}
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"scripts": {
"reskindex": "./reskindex.js -h header",
"build": "babel src -d lib --source-maps --stage 1",
"start": "babel src -w -d lib --source-maps --stage 1",
"build": "babel src -d lib --source-maps",
"start": "babel src -w -d lib --source-maps",
"lint": "eslint src/",
"lintall": "eslint src/ test/",
"clean": "rimraf lib",
Expand All @@ -24,6 +24,7 @@
"test-multi": "karma start $KARMAFLAGS --single-run=false"
},
"dependencies": {
"babel-runtime": "^6.11.6",
"browser-request": "^0.3.3",
"classnames": "^2.1.2",
"draft-js": "^0.8.1",
Expand Down Expand Up @@ -56,11 +57,17 @@
"let's stick with v5 for now."
],
"devDependencies": {
"babel": "^5.8.23",
"babel-core": "^5.8.38",
"babel-cli": "^6.5.2",
"babel-core": "^6.14.0",
"babel-eslint": "^6.1.0",
"babel-loader": "^5.4.0",
"babel-loader": "^6.2.5",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-es2016": "^6.11.3",
"babel-preset-es2017": "^6.14.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-0": "^6.5.0",
"eslint": "^2.13.1",
"eslint-plugin-flowtype": "^2.17.0",
"eslint-plugin-react": "^6.2.1",
Expand Down
4 changes: 3 additions & 1 deletion reskindex.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ for (var i = 0; i < files.length; ++i) {
var file = files[i].replace('.js', '');

var moduleName = (file.replace(/\//g, '.'));
var importName = moduleName.replace(/\./g, "$");

strm.write("module.exports.components['"+moduleName+"'] = require('./components/"+file+"');");
strm.write("import " + importName + " from './components/" + file + "';\n");
strm.write("module.exports.components['"+moduleName+"'] = " + importName + ";");
strm.write('\n');
strm.uncork();
}
Expand Down
Loading