Skip to content

Commit 9063f54

Browse files
committed
Fixed the Makefile to not error if a directory already exists, and to create the correctly named js.map file.
1 parent 88b1647 commit 9063f54

4 files changed

+4
-9
lines changed

Makefile

+4-9
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ NODE_MODULES := node_modules/.bin
44
BOWER_COMPONENTS := bower_components
55

66
all: lint js css test
7-
#
8-
# Copy minified file to site
9-
#
10-
cp dist/sequence-diagram*-min.js* _site/
11-
127
js: dist/sequence-diagram-min.js dist/sequence-diagram-raphael-min.js dist/sequence-diagram-snap-min.js
138
css: dist/sequence-diagram-min.css font
149
font: dist/danielbd.woff2 dist/danielbd.woff
@@ -31,7 +26,7 @@ dependencies: node_modules bower_components
3126

3227
clean:
3328
-rm build/*
34-
-git checkout -- dist/*
29+
-git checkout -- dist
3530

3631
veryclean: clean
3732
-rm -rf node_modules
@@ -74,7 +69,7 @@ test: dependencies dist/sequence-diagram-min.js
7469
-d test/*-mock.js $(BOWER_COMPONENTS)/lodash/dist/lodash.min.js
7570

7671
build/grammar.js: src/grammar.jison
77-
mkdir build
72+
mkdir -p build
7873
$(NODE_MODULES)/jison $< -o $@.tmp
7974

8075
# After building the grammar, run it through the uglifyjs to fix some non-strict issues.
@@ -91,7 +86,7 @@ build/diagram-grammar.js: src/diagram.js build/grammar.js
9186

9287
# Combine all javascript files together (Raphael and Snap.svg)
9388
dist/sequence-diagram.js: src/main.js build/diagram-grammar.js src/jquery-plugin.js src/sequence-diagram.js src/theme.js src/theme-snap.js src/theme-raphael.js fonts/daniel/daniel_700.font.js
94-
mkdir dist
89+
mkdir -p dist
9590
$(NODE_MODULES)/preprocess $< . -SNAP=true -RAPHAEL=true > $@
9691

9792
# Combine just Raphael theme
@@ -125,5 +120,5 @@ dist/%-min.js dist/%-min.js.map: dist/%.js
125120
$(NODE_MODULES)/uglifyjs \
126121
$< -o $@ \
127122
--compress --comments --lint \
128-
--source-map $<.map \
123+
--source-map $@.map \
129124
--source-map-url `basename $<`
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)