node-task / spec

A specification for javascript tasks.
MIT License
153 stars 2 forks source link

just a little feedback from @brunch author #1

Closed paulmillr closed 11 years ago

paulmillr commented 11 years ago

Hey, @sindresorhus pointed to your proposal. really nice job, looks like something i’d use in @brunch if it was standardised.

If you’re interested, current brunch plugin architecture is described at the wiki page and it’s sort of similar. Basically all brunch tasks can be reduced to using this spec.

Preferring declarative input handling to IO calls is very good idea. IO calls can be cached and grunt has big problems with this, you cannot implement efficient compilator for big apps based on current shitty plugins.

It would be really nice if tasks were independent and there was no need in require('task'), because, what are the advantages of this?

Also, another idea I used in brunch is config freezing. Deep Object.freeze is done on config to prevent its mutability and reduce bug count a lot.

Waiting forward for contributing on this :+1:

tkellen commented 11 years ago

Hey Paul,

Sorry for the slow reply. My wife and I have been busy moving from Minnesota to Vermont the last week. I'm super excited to hear that you like the look of this proposal so far. I think it'd be a big win for the entire node community if node-task compatibile plugins worked with brunch.

There is no need to use the task package as a dependency for a node-task compliant task. The README clearly outlines how to roll your own. The main benefit for using it is a reduction in boilerplate to produce a compliant module. No event emitting, no filesystem calls if doing standard file reading/writing, etc. As an aside, please ignore the grunt dependency on this package, it is only there for testing purposes (hooking into grunt.file for reading/writing). This will be removed in favor of something more generalized before the spec/package is released.

Just FYI, I am a core committer to the grunt project; the main thrust for this spec will be happening after grunt 0.4 ships. Once that happens, @cowboy and I will be fleshing this out further. I will be sure to ping you when we get going again.

Thanks for getting in touch!