Comments (4)
Didn't notice this issue until now, but I actually spotted the bug myself the same day you reported it and fixed it in 53fdd21, which made it into assetgraph-builder 0.3.72 :)
Now the output is:
<!doctype html>
<html lang="en_US"><head><script>// navigation timing script
var foo=new Date</script><meta http-equiv="Content-Version" content="/production" /></head><body><script>alert("application")</script><script>// navigation timing script
var bar=new Date</script></body></html>
Hmm, it's annoying that those leading comments are preserved, I'll change it so it only preserves /*! ... */
as per YUICompressor's convention.
from assetgraph-builder.
Cool. I'll upgrade first thing tomorrow and get it into production.
from assetgraph-builder.
As of the freshly released 0.3.76 (including the --version
and copyright notice fixes) the output is:
<!doctype html>
<html lang="en_US"><head><script>var foo=new Date</script></head><body><script>alert("app")</script><script>var bar=new Date</script></body></html>
Phew, that was better :)
from assetgraph-builder.
Added bonus: This means you can now build a production build with the same features as a development build, but without the development build bootstrap javascript. See my current Makefile:
http-pub/%.html: http-pub/%.html.template $(DEPS) node_modules/.bin/buildDevelopment
buildDevelopment \
--root http-pub \
--version $(VERSION)/development \
$<
sed -i "s/__VERSION__/$(VERSION)/g" $@
build-production/%.html: http-pub/%.html.template $(DEPS) node_modules/.bin/buildProduction
rm -rf $(@D)
buildProduction \
--root $(<D) \
--outroot $(@D) \
--optimizepngs \
--version $(VERSION) \
--asyncscripts \
--locale $(LOCALE) \
$<
mv $(@:html=html.$(LOCALE).template) $@
sed -i "s/__VERSION__/$(shell git describe --tags --always --abbrev=0)/g" $@
cp $(<D)/robots.txt $(@D)
cp -r $(<D)/flash/* $(@D)/static/
from assetgraph-builder.
Related Issues (20)
- Dedupe source maps HOT 1
- RSS feed link gets updated wrong
- When browsers list is not configured, look for it in package.json HOT 2
- Support .browserslistrc and browserslist key in package.json HOT 5
- Is it possible to wrap the built JS in a function to not expose define() ? HOT 4
- Throws when encountering Html Svg island with inline style HOT 1
- Generates invalid syntax from ES6 code HOT 4
- `node-zopfli` package seems no longer maintained HOT 5
- Ruby Sass is deprecated HOT 2
- Add `--preflight-check` cmdline option HOT 7
- `npm audit` complaints HOT 6
- Breaks await expression HOT 4
- Breaks relative ES6 module paths HOT 4
- ⚠ WARN: Cannot read property 'length' of null HOT 2
- [Q] CHANGELOG? HOT 4
- make assetgraph to not process svg HOT 2
- Translation not working HOT 1
- How to customize? HOT 3
- a vulnerability CVE-2020-7598 is introduced in assetgraph-builder
- Svgo is not a constructor HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assetgraph-builder.