mklabs / node-build-script

MIT License
322 stars 55 forks source link

update data-main to point to the minfied main.js #53

Closed martinblech closed 12 years ago

martinblech commented 12 years ago

On RequireJS projects, the build script must update both src and data-main attributes of the script tag to point to the minified versions. Now it does.

martinblech commented 12 years ago

If the rjs.almond option in grunt.js is set to true, the build script removes references to requirejs from html and includes almond instead.

mklabs commented 12 years ago

Sounds like really good changes. Thanks! Merged.

The only missing things would be some unit tests to test out this new feature, but tests are kinda difficult to grasp right now and not really well documented.

martinblech commented 12 years ago

I've implemented unit tests for this new feature here: https://github.com/h5bp/node-build-script/pull/54

martinblech commented 12 years ago

@paulirish / @mklabs is this or something similar gonna be in Yeoman? Can I have a look?

mklabs commented 12 years ago

@martinblech Something similar will be in Yeoman yes. Feel free to ping @addyosmani to be include in the beta tester group, if it's ok to Addy. It's not up to me :)

andrewkro commented 12 years ago

Hey,

Im having this exact issue with h5bp that i got today (17-Oct-2012). Is this issue open again now h5bp is using Yeoman?

mklabs commented 12 years ago

Hey @andrewkro nothing is decided yet. This project is not using yeoman (only in ymn branch for now to experiment). If you're using node-build-script pointing to master branch, you should have @martinblech fixes around.