1
- CLEANCSS = node_modules/.bin/cleancss
2
- BROWSERIFY = node_modules/.bin/browserify
3
-
4
1
# the default rule when someone runs simply `make`
5
2
all : \
6
3
dist/mapbox.js \
@@ -22,13 +19,13 @@ dist:
22
19
mkdir -p dist
23
20
24
21
dist/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
26
23
27
24
dist/mapbox.uncompressed.css : theme/style.css
28
25
cat theme/style.css > dist/mapbox.uncompressed.css
29
26
30
27
dist/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
32
29
33
30
theme/images : theme/images/icons.svg
34
31
./theme/images/render.sh
@@ -39,24 +36,24 @@ dist/images/icons-404040.png: theme/images
39
36
rm -f dist/images/render.sh
40
37
41
38
# 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] > $@
44
41
45
42
# 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 > $@
48
45
49
46
# 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] > $@
52
49
53
50
# 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 > $@
56
53
57
54
# 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 > $@
60
57
61
58
clean :
62
59
rm -rf dist/*
0 commit comments