Git Product home page Git Product logo

Comments (4)

papandreou avatar papandreou commented on September 26, 2024

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.

Munter avatar Munter commented on September 26, 2024

Cool. I'll upgrade first thing tomorrow and get it into production.

from assetgraph-builder.

papandreou avatar papandreou commented on September 26, 2024

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.

Munter avatar Munter commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.