I'm trying to minify www/js/app.js
to www/js/app.min.js
with a source-map: www/js/app.min.js.map
.
I also want app.min.js
to contain the line //# sourceMappingURL=app.min.js.map
Is this possible to achieve without using the cd
command?
So far this is the only thing that works for me:
cd www/js && uglifyjs app.js --mangle --compress --stats --source-map app.min.js.map --output app.min.js && cd ../../
I have been referencing https://github.com/mishoo/UglifyJS2#usage --source-map [options]
but nothing seems to work, so maybe I'm missing something obvious.