tactivos / grunt-cdn

79 stars 53 forks source link

Support for prepending requirejs data-main attribute; Fix `dest` option #19

Closed ichuan closed 11 years ago

ichuan commented 11 years ago

Suppose html like this:

<script data-main="scripts/main" src="bower_components/requirejs/require.js"></script>

After grunt-cdn:

<script data-main="scripts/main" src="http://cdn/bower_components/requirejs/require.js"></script>

With this commit, scripts in the data-main will also get cdned:

<script data-main="http://cdn/scripts/main" src="http://cdn/bower_components/requirejs/require.js"></script>

The dest option is in fact unavailable, mofified content still goes to original file. This commit also fix this.

johnnyhalife commented 11 years ago

Testing we'll marge it tomorrow.

On Sat, Jul 6, 2013 at 2:04 AM, yc notifications@github.com wrote:

Suppose html like this:

After grunt-cdn:

With this merge, scripts in the data-main will also get cdned:


You can merge this Pull Request by running

git pull https://github.com/ichuan/grunt-cdn master

Or view, comment on, or merge it at:

https://github.com/tactivos/grunt-cdn/pull/19 Commit Summary

  • Support for prepending requirejs data-main attribute

File Changes

  • M tasks/grunt-cdn.jshttps://github.com/tactivos/grunt-cdn/pull/19/files#diff-0(13)

Patch Links:

seejee commented 11 years ago

@johnnyhalife @ichuan Thanks for your work on this! We ran into the same issue, and are using @ichuan's fork successfully in our app.

Would it be possible to merge this in so we can use the 'official' package? Thanks again!

johnnyhalife commented 11 years ago

It has been published as 0.2.4