Add windows support for build and test.#4843
Conversation
a864efc to
beb2d0f
Compare
Current coverage is 89.32% (diff: 100%)@@ master #4843 diff @@
==========================================
Files 196 219 +23
Lines 13833 13980 +147
Methods 1439 1458 +19
Messages 0 0
Branches 3213 3273 +60
==========================================
+ Hits 12352 12488 +136
- Misses 1481 1492 +11
Partials 0 0
|
| "cov-tests": "cross-env NODE_ENV=test node node_modules/istanbul/lib/cli.js cover scripts/run-tests.js -- --color || true", | ||
| "test-ci": "npm run bootstrap && npm run cov-tests && node node_modules/codecov.io/bin/codecov.io.js < coverage/coverage.json", | ||
| "publish": "git pull --rebase && rimraf packages/*/lib && cross-env BABEL_ENV=production npm run build-dist && npm test && lerna publish --only-explicit-updates && npm run clean", | ||
| "bootstrap": "npm run clean-all && npm install && lerna bootstrap && npm run build && cd packages/babel-runtime && npm install && node scripts/build-dist.js" |
There was a problem hiding this comment.
To me it seems like this would be way cleaner if you used a task runner like Gulp. This file is very difficult to read - All the npm run and && are purely syntax noise. Gulp's syntax for describing dependencies between tasks is much nicer.
There was a problem hiding this comment.
Yes I agree, even simple node scripts/shelljs would be an alternative.
There was a problem hiding this comment.
Sorry for taking so long to reply to your comments,.. @Daniel15 Are you sure Gulp is the best idea for this? I have spent some time trying to convert these scripts into gulp tasks with varying levels of success; whilst some of the simple ones are quite straight forward, tasks with multiple dependencies are problematic - the dependent tasks run in parallel when they need to be ran sequentially (although Gulp 4 should address this I gather). Of course, the tasks could be rewritten to avoid multiple dependencies although that would lead to a lot of duplicate code and/or a lot of gulp tasks. @danez I think node scripts would be a better approach although potentially there could end up being quite a few of them. I am not familiar with shelljs however, but after having a quick look at it that may also be a viable alternative.
|
I've definitely built Babel on Windows in the past, I guess I just avoided the Makefile. This idea looks reasonable to me 😄 |
|
I think we will do this at some point, but haven't decided how. Will close for now. As soon as we have something I can ping you if you are still open to help then. |
|
For what it's worth, the build mostly works for me on Windows. I just need to occasionally manually run some commands. I'm using Also works perfectly on Windows Subsystem for Linux (Ubuntu on Windows) |
Added scripts to package.json to allow build and test to be used on Windows platforms
@danez I accidently deleted the original pull request for this (#4752) hence this new one. Also, since I created the original, new functionality was added to the makefile which I have since added to the package.json scripts.