Skip to content

Add windows support for build and test.#4843

Closed
garyjN7 wants to merge 1 commit intobabel:masterfrom
garyjN7:build-support-for-windows
Closed

Add windows support for build and test.#4843
garyjN7 wants to merge 1 commit intobabel:masterfrom
garyjN7:build-support-for-windows

Conversation

@garyjN7
Copy link
Copy Markdown

@garyjN7 garyjN7 commented Nov 15, 2016

Added scripts to package.json to allow build and test to be used on Windows platforms

Q A
Bug fix? no
Breaking change? no
New feature? yes
Deprecations? no
Spec compliancy? no
Tests added/pass? no
Fixed tickets none
License MIT
Doc PR none

@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.

@garyjN7 garyjN7 force-pushed the build-support-for-windows branch from a864efc to beb2d0f Compare November 15, 2016 16:24
@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 15, 2016

Current coverage is 89.32% (diff: 100%)

Merging #4843 into master will increase coverage by 0.03%

@@             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          

Powered by Codecov. Last update 5075f3c...beb2d0f

"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"
Copy link
Copy Markdown
Member

@Daniel15 Daniel15 Nov 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@danez danez Nov 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree, even simple node scripts/shelljs would be an alternative.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Daniel15
Copy link
Copy Markdown
Member

I've definitely built Babel on Windows in the past, I guess I just avoided the Makefile. This idea looks reasonable to me 😄

@hzoo hzoo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Dec 15, 2016
@danez
Copy link
Copy Markdown
Member

danez commented Aug 31, 2017

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.

@danez danez closed this Aug 31, 2017
@Daniel15
Copy link
Copy Markdown
Member

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 make from the GnuWin32 project.

Also works perfectly on Windows Subsystem for Linux (Ubuntu on Windows)

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants