avalade / grunt-coffee Goto Github PK
View Code? Open in Web Editor NEWCoffee script for your grunt
License: MIT License
Coffee script for your grunt
License: MIT License
registerHelpers will be depreciated in grunt 0.4.
To see how helpers will be handled in the future (using standard npm require), check out the following links:
https://github.com/gruntjs/grunt-contrib-uglify/blob/master/tasks/uglify.js#L15
https://github.com/gruntjs/grunt-contrib-uglify/blob/master/tasks/lib/min.js
PS: The task grunt-contrib-coffee should provide all of the functionality that this task does and will be maintained by the grunt team in perpetuity. It'd be awesome if you could check this out and see if it fulfills your needs. Assuming it does, perhaps you could depreciate yours to lessen the fragmentation in the community?
The grunt.registerHelper API has been completely removed from the 0.4.0a (devel
branch) -- see issue 354 / changeset for the explanation.
An example of rewriting a task to remove registerHelper is here
Here's another look a the lint task - 0.3 to 0.4
0.4 lint.js
0.3 lint.js
Could you add a concat before compile option? I had done this myself on the grunt 0.3 version and it'd be nice if it were in the new one.
Looks like the release is approaching...
https://github.com/michaelficarra/CoffeeScriptRedux
Enabling source maps is a huge win -- and supported with the current release.
http://ryanflorence.com/2012/coffeescript-source-maps/
Perhaps a toggle in the options could be added to use the new compiler... until it overtakes the current v1 compiler?
I would consider implementing this myself, but I've got my hands full at the moment. If some free time comes up, I might take it on.. otherwise, offering it up as a suggestion for now.
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
As reported back on issue #11:
When I use preserve_dirs: true, it ignores dest and puts the files inside my coffee directory next to the file it is converted from, instead of in my js dir i have specified in dest. Am I doing something wrong?
{
src: [coffeeDir + '*/.coffee'],
dest: jsDir,
options: {
bare: true,
preserve_dirs: true
}
}
I've tried setting a base_dir as the js dir also, but no luck. I see you are talking about a destPath, is that different than just dest?
thanks for sharing this grunt plugin! any recommendations for handling multiple source directories like (app/models, app/controllers, app/views, etc..) while having the compiled js files written to the same directory as the coffee files?
I can wildcard the src option with ["app/"' "app/*/"] but I can't get the compiled js files to be written back to the same directories.
when performing the regex replace expression (on the base_path) when preserve_dir is set to true:
it would be nice to have the options.base_path expanded using grunt.template.process allowing for configuration like:
dist: {
src: ['<%= pkg.src %>/*/.coffee'],
dest: '<%= pkg.dist %>',
options: {
bare: true,
preserve_dirs: true,
base_path: '<%= pkg.src %>'
}
}
Actually after playing around with the grunt.config.get/process
functions I read that there is a generic 'options' handler which should fix this.
var options = this.options({ /defaults/ });
Although this will be dependent on grunt > 3.12.
Calling grunt-coffee with a list of sources overwrites the options object passed in. Coffeescript appends objects to the options reference, which causes follow-on iterations to lack the Coffeescript header. This lack, in turn, breaks scripts that use require.js
Would be great if the compiled coffee-script files follow the same directory structure on the destination path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.