Closed krampstudio closed 11 years ago
How's the backward compatibility for this?
On Thu, Feb 14, 2013 at 3:37 AM, Bertrand CHEVRIER <notifications@github.com
wrote:
Hi, for my personal needs I've update your task to run on Grunt 0.4
You can merge this Pull Request by running
git pull https://github.com/krampstudio/grunt-htmlrefs master
Or view, comment on, or merge it at:
https://github.com/tactivos/grunt-htmlrefs/pull/5 Commit Summary
- start to migrate task to grunt 0.4 way
- Update task to ran with Grunt 0.4
- Upgrade internal grunt to 0.4
File Changes
- R Gruntfile.jshttps://github.com/tactivos/grunt-htmlrefs/pull/5/files#diff-0(2)
- M package.jsonhttps://github.com/tactivos/grunt-htmlrefs/pull/5/files#diff-1(6)
- M tasks/grunt-htmlrefs.jshttps://github.com/tactivos/grunt-htmlrefs/pull/5/files#diff-2(66)
Patch Links:
This isn't backward compatible to grunt 0.3. Usually the plugin authors maintain a version for 0.4 in another branch and publish it under a new version number, ie. 0.2.x for grunt 0.3 and 0.3.x for grunt 0.4.
Up to you to decide if you want a backward compatible version of your plugin: it would be possible by checking each API calls: var _ = grunt.utils ? grunt.utils._ : grunt.util._
and so on, according to the Upgrade guide
Seems like includes are broken, ie.
htmlrefs: {
dist: {
src: './app/index.html',
dest: './dist/',
includes: {
airbrake: './app/views/airbrake.html'
}
}
}
inside registerMultiTask we get
var params = this.options();
var includes = (params.includes || {});
console.log(includes) => { }
The reason probably being this.options() returns an empty hash {}.
I'm using grunt 0.4.0rc8, could that be the reason?
No it broks because because the way grunt 0.4 manages options, this is an error... I'll update the PR
Any word on incorporating the fix by @krampstudio? Seems to work fine for me.
Merged and published, hey @krampstudio would you mind adding the standard stuff on the README (like contrib and all), I'll really appreciate your help. Anyway I'm publishing this version!
Sure, I'll do it as soon as I have some availability
Hi, for my personal needs I've update your task to run on Grunt 0.4