Rewrite Makefile using NPS Scripts; Closes #2352 #3194
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #2352
Description of the Change
Where possible, I tried to exactly duplicate the design of the Makefile using
nps
. I've tested it by runningbuild
andtest
commands, as well as granular testing of individual commands against a vanilla repo to ensure it's running the same commands.Important notes:
==> [<ACTION> :: <SUBACTION>]
output from makefile asnps
does this automaticallymake .PHONY
as this appeared to be a hack for GNU make. I'm not sure if some kind of file watching capability is desired. Perhaps this can be added back if needed.SRC_FILES
variable) from Makefile as I didn't see a big reason to include this innps build
commandCOVERAGE
to any valuenps
makes this inconvenient)withCoverage
directive to thenps
task list, i.e.nps test.node.bdd withCoverage
make
is nownps build
make
but were not inpackage.json
will be brokennps
will need to be installed globally to work well, or at least be included in user's$PATH
npm run <xxx>
commands are nownpm start <xxx>
ornps <xxx>
Alternate Designs
Possible modifications:
npsUtils.concurrently.nps
to run tests in parallel. This has pros and cons.nps
if neededNYC
,MOCHA
, etc, though I imagine these may be useful in case a developer wants to temporarily direct these scripts to use a different installationWhy should this be in core?
Discussed this briefly with @boneskull on Gitter back in early 2016. Didn't get around to doing it till now (my bad).
Benefits
Makefile gone!
Possible Drawbacks
Any code that depends on
make
commands will need to be updated.Applicable issues
This should not be a breaking change, unless there is some code I'm not aware of that depends on make commands (possibly some CI type operations)