Added npm build script for building with local grunt. #643
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.
@pablojim thank you for making and sharing highcharts-ng! I have two motivations for this PR,
1.2.1-dev
wasn't rebuilt (the dist folder still had1.2.0
), I forked the repo to create a build. I don't have grunt installed globally, preferring npm scripts these day because they can keep dependencies local. This is a pattern adopted by many since npm scripts will fix up the path to allow for local dependencies and for conventional targets likenpm run build
. Just looking at some other examples, angular.js uses a script wrapper for the grunt command in their package.json and vue.js uses a build script wrapper in their package.json. Personally, I favor abuild
script over agrunt
script but that's preference. Since you have a default build target in your gruntfile, you have the added advantage of being able to provide a build target by simply wrapping grunt. For example,npm run build -- watch
will run the equivalent ofgrunt watch
.Feel free to close this PR. The main motivation is the need for a new version. But, I do think npm scripts are a popular option these days as well.
Thank you for your time and consideration.