-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature: Add babel transpiling to be backwards compatible with older Node.js versions #2
Conversation
Thanks for jumping on this. I appreciate the elaborate explanation and the work on the PR! Remaining items for us to sort out:
Great job! I think that's mostly it. |
Hi @lirantal, it was my pleasure :) Travis still seems to be unhappy, but I don't see why. Any idea? |
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.
great stuff!
minor change before we merge
package.json
Outdated
"test": "node --harmony node_modules/.bin/ava", | ||
"test:watch": "node --harmony node_modules/.bin/ava --watch", | ||
"test:coverage": "nyc node --harmony node_modules/.bin/ava", | ||
"test": "npm run build; node --harmony node_modules/.bin/ava", |
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.
@bluzi we should use &&
between the commands instead of ;
so that the 2nd part is only run if the first part is successful. can you make the change across the other commands as well? (test:watch, etc)
Done LMK if there's anything else :) |
One last change - since you moved the |
To be clear and elaborate on the above comment, you need to make the following change in |
Yup, I understood :) one sec |
Cool. Sorry for the churn, I noticed it just now :) |
np :) |
@bluzi some open items we have for additional work:
I can open separate issues for each so we can tackle them in parallel PRs. |
Sure, open an issue for everything you want to add, and I might take one or two :) Anyway, that was fun and productive :) |
oh right! great idea, I'll adopt it here and in my other repos too. |
Prepare to be overwhelmed with PRs :P |
Wouldn't take it any other way :-) |
Hi,
As we discussed, this PR adds Babel transpilation to the project.
From now on, you're going to have to run
npm run build
before you deploy a new version to npm. This will create a backward-compatible version ofindex.js
indist/
.Before merging this, there's something we still need to figure out together:
The
listing files fail if the filespattern is empty
test fails when executed against the transpiled code. I think it's because Babel ignoresbluebird
and uses its own Promise, but I'm not completely sure.Anyway, I thought it will be best it I'll show it to you and make sure it's alright.
This is a complete list of what this PR adds:
babel-cli
,babel-core
,babel-polyfill
,babel-preset-env
)src/
(just to separate it completely fromdist/
)dist/
added to.gitignore
build
script topackage.json
I've tested it using both
Node v4.8.4
andNode v8.6.0
using this code, and it seems to work flawlessly.LMK if you want any changes.