Skip to content

Commit

Permalink
Use end-to-end map file generation
Browse files Browse the repository at this point in the history
  • Loading branch information
thenickdude committed May 10, 2021
1 parent 485ac0e commit 2452508
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ resources/css/chickenpaint.css : resources/css/chickenpaint.scss resources/fonts
node_modules/.bin/sass $< > $@
node_modules/.bin/postcss --replace $@

resources/js/chickenpaint.min.js : resources/js/chickenpaint.js
cd resources/js && ../../node_modules/.bin/uglifyjs --compress --mangle --source-map "filename='chickenpaint.min.js.map',url='chickenpaint.min.js.map',root='./'" --output chickenpaint.min.js -- chickenpaint.js
resources/js/chickenpaint.min.js resources/js/chickenpaint.min.js.map : resources/js/chickenpaint.js
cd resources/js && ../../node_modules/.bin/uglifyjs --compress --mangle \
--source-map "content='chickenpaint.js.map',filename='chickenpaint.min.js.map',url='chickenpaint.min.js.map',root='./'" --output chickenpaint.min.js -- chickenpaint.js

resources/js/chickenpaint.js : js/engine/* js/gui/* js/util/* js/ChickenPaint.js js/engine/CPBlend.js lib/*
node_modules/.bin/browserify --standalone ChickenPaint --outfile $@ -d -e js/ChickenPaint.js -t babelify
node_modules/.bin/browserify --standalone ChickenPaint --debug --entry js/ChickenPaint.js --transform babelify | node_modules/.bin/exorcist $@.map > $@

resources/fonts/ChickenPaint-Symbols.scss : resources/fonts/chickenpaint-symbols-source/*
node_modules/.bin/icomoon-build -p "resources/fonts/chickenpaint-symbols-source/ChickenPaint Symbols.json" --scss resources/fonts/ChickenPaint-Symbols.scss --fonts resources/fonts
Expand Down Expand Up @@ -61,7 +62,7 @@ js/engine/CPBlend.js : codegenerator/BlendGenerator.js
node codegenerator/BlendGenerator.js > js/engine/CPBlend.js

clean :
rm -f resources/css/chickenpaint.css resources/js/chickenpaint.js resources/js/chickenpaint.min.js resources/js/chickenpaint.min.js.map
rm -f resources/css/chickenpaint.css resources/js/chickenpaint{.js,.js.map} resources/js/chickenpaint.min{.js,.js.map}
rm -f test/blending_bench/blending_test.js test/blending_bench/blending.js test/integration_test/integration.js js/engine/CPBlend.js
rm -f resources/fonts/ChickenPaint-Symbols.{scss,ttf,woff,eot}
rm -f chickenpaint.zip
97 changes: 97 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"canvas": "^2.7.0",
"exorcist": "^2.0.0",
"icomoon-build": "^0.2.8",
"mocha": "^8.4.0",
"multipipe": "^2.0.3",
Expand Down
1 change: 1 addition & 0 deletions resources/js/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/chickenpaint.js
/chickenpaint.js.map
/chickenpaint.min.js
/chickenpaint.min.js.map

0 comments on commit 2452508

Please sign in to comment.