Here is my idea of ββwhat can be done. Please provide your ideas and solutions. This solution has not been verified.
according to https://github.com/PolymerLabs/polybuild the polybuild tool is the same as:
vulcanize --inline-css --inline-scripts --strip-comments index.html | polyclean | crisper --html index.build.html --js index.build.js
order:
1) vulcanization produces one html-formatted file.
2) polyclean uses uglifyjs internaly and does some cleanup
3) crisper is used to separate already quenched and mini js from html
as far as I know, uglifyjs does not work with html files as input, so polyclean manually cuts parts of the js code ', puts it through uglifyjs and inserts it back (I hope I understand how polyclean works correctly). Therefore, creating source maps is useless in this context. my idea is to reorder the polyclean and crisper and change the polyclean to allow the use of external options for uglifyjs2:
new order:
1) vulcanization produces one html-formatted file.
2) crisper is used to separate formatted js from html.
3) polyclean uses uglifyjs internaly and does some cleanup (in this case we need to use both js and html files)
So, first you will have an html file and a formatted js file, and only then can you use uglifyjs2 (a call from polyclean or standalone?) With the -source-map and -source-map-include-sources options. Now you can track your mistakes using the created source map, which already contains a formatted copy of the js file created in step 2.
source share