-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amd and commonjs to es6 #131
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["es2015"], | ||
"plugins": ["transform-runtime"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
"lint": "eslint \"src/**/*.js\" \"test/**/*.js\"", | ||
"test": "npm run lint && npm run build", | ||
"build": "webpack -p", | ||
"start": "webpack-dev-server -d --inline --hot" | ||
"start": "webpack-dev-server -d --inline --hot", | ||
"prepublish": "babel -d dist/ src/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will transform ES6 sources to ES5 with CommonJS imports, so it's a "legal" NPM module (see #122); it should target
And (see #44 where this was all done) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An alternative would be to use CommonJS for now and stick with ES5: no need for that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking more about it: we don't follow NPM / Node.js rules for imports (non-relative names –i.e. those not starting with Our current usage of referencing files by their absolute path “relative” to our So I think we should just remove that |
||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -29,6 +30,12 @@ | |
"simd": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.5.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm really not sure AFAICT, the |
||
"babel-core": "^6.5.1", | ||
"babel-loader": "^6.2.2", | ||
"babel-plugin-transform-runtime": "^6.5.0", | ||
"babel-preset-es2015": "^6.5.0", | ||
"babel-runtime": "^6.5.0", | ||
"eslint": "^2.5.3", | ||
"eslint-loader": "^1.3.0", | ||
"js-beautify": "^1.6.2", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this
define
needed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an artifact of the
sed
script being used to transform "named defines" to "unnamed defines" prior to runningamdtoes6
(which doesn't support named defines). Thesed
script modified that file, butamdtoes6
obviously didn't.IMO, either we:
master
anywaydoc
frommaster
first, then rebase that change on top