1- CLEANCSS = node_modules/.bin/cleancss
2- BROWSERIFY = node_modules/.bin/browserify
3-
41# the default rule when someone runs simply `make`
52all : \
63 dist/mapbox.js \
@@ -22,13 +19,13 @@ dist:
2219 mkdir -p dist
2320
2421dist/mapbox.css : dist/mapbox.uncompressed.css
25- $( CLEANCSS ) dist/mapbox.uncompressed.css -o dist/mapbox.css
22+ npx cleancss dist/mapbox.uncompressed.css -o dist/mapbox.css
2623
2724dist/mapbox.uncompressed.css : theme/style.css
2825 cat theme/style.css > dist/mapbox.uncompressed.css
2926
3027dist/mapbox.standalone.css : theme/style.css
31- cat theme/style.css | $( CLEANCSS ) > dist/mapbox.standalone.css
28+ cat theme/style.css | npx cleancss > dist/mapbox.standalone.css
3229
3330theme/images : theme/images/icons.svg
3431 ./theme/images/render.sh
@@ -39,24 +36,24 @@ dist/images/icons-404040.png: theme/images
3936 rm -f dist/images/render.sh
4037
4138# assemble a complete library for development
42- dist/mapbox.js : node_modules/.install dist $(shell $( BROWSERIFY ) --list src/index.js)
43- $( BROWSERIFY ) src/index.js --debug -p [minifyify --map mapbox.js.map --output dist/mapbox.js.map] > $@
39+ dist/mapbox.js : node_modules/.install dist $(shell npx browserify --list src/index.js)
40+ npx browserify src/index.js --debug -p [minifyify --map mapbox.js.map --output dist/mapbox.js.map] > $@
4441
4542# assemble an uncompressed but complete library for development
46- dist/mapbox.uncompressed.js : node_modules/.install dist $(shell $( BROWSERIFY ) --list src/index.js)
47- $( BROWSERIFY ) src/index.js --debug > $@
43+ dist/mapbox.uncompressed.js : node_modules/.install dist $(shell npx browserify --list src/index.js)
44+ npx browserify src/index.js --debug > $@
4845
4946# assemble a library without bundled leaflet
50- dist/mapbox.standalone.js : node_modules/.install dist $(shell $( BROWSERIFY ) --list src/mapbox.js)
51- $( BROWSERIFY ) src/mapbox.js --debug -p [minifyify --map mapbox.standalone.js.map --output dist/mapbox.standalone.js.map] > $@
47+ dist/mapbox.standalone.js : node_modules/.install dist $(shell npx browserify --list src/mapbox.js)
48+ npx browserify src/mapbox.js --debug -p [minifyify --map mapbox.standalone.js.map --output dist/mapbox.standalone.js.map] > $@
5249
5350# assemble an uncompressed library without bundled leaflet
54- dist/mapbox.standalone.uncompressed.js : node_modules/.install dist $(shell $( BROWSERIFY ) --list src/mapbox.js)
55- $( BROWSERIFY ) src/mapbox.js --debug > $@
51+ dist/mapbox.standalone.uncompressed.js : node_modules/.install dist $(shell npx browserify --list src/mapbox.js)
52+ npx browserify src/mapbox.js --debug > $@
5653
5754# assemble an uncompressed but complete library for development
58- dist/mapbox.internals.js : node_modules/.install dist $(shell $( BROWSERIFY ) --list src/internals.js)
59- $( BROWSERIFY ) src/internals.js --debug > $@
55+ dist/mapbox.internals.js : node_modules/.install dist $(shell npx browserify --list src/internals.js)
56+ npx browserify src/internals.js --debug > $@
6057
6158clean :
6259 rm -rf dist/*
0 commit comments