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.
Origin of the PR
The main issues I found with the makefile:
So this PR has one goal: get rid of the makefile by using only npm and a LiveScript file.
What it does
This PR adds entries in the
package.json
that work with aindex.ls
file at the root of the repository. Using thenpm run [command]
syntax directly in the console it's now possible to launch this specific actions:browser
: compile the lib into 2 files,livescript.js
andlivescript.min.js
. Replace thebrowser
,build-browser
,browser/livescript.js
andbrowser/livescript-min.js
makefile targets.clean
: remove the following directories: browser, lib and coverage. Not exactly the same as the makefileclean
targets, but the needs are a little bit different.coverage
: run istanbul to get the package coverage. Replace the makefilecoverage
target.lib
: compile the lib itself, creating the lib directory and filling it up with all the js files composing the livescript lib. Replace thelib
,lib/parser.js
andlib/%.js
targets.package
: (re)generating thepackage.json
from thepackage.json.ls
. Replace thepackage.json
target.test
: launch the test script. Replace thetest
targetThe
README.md
is also updated with the same explanation.Some makefile targets weren't transfered like
all
,loc
,force
,full
,install
anddev-install
. Most of their actions are already standards now. I left the makefile unchanged for people who still wanted to use it.Side effects
I bumped the
uglify-js
version as it doesn't change anything meaningful, but I kept the istanbul as it is. I think, as written in the code itself, that a rewrite with mocha is a better idea.Note
It's an opiniated PR, so I will understand that it may be refused, I'm ok with this.