-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support compilation of pre-processors (coffee-script, jade, sass, ...) #149
Comments
Do you know about grunt-contrib ? |
There is a SASS task in the process of being added to grunt-contrib by @tkellen. |
Cool, although the idea of using DocPad is that you automatically support everything that DocPad supports, so you have one grunt task that utilises the docpad rendering engine, so supporting a new pre-processor is as simple as installing the associated Plugin for it. The javascript code to do this is with the latest versin of DocPad is: require('docpad').createInstance(function(err,docpadInstance){
docpadInstance.action('render', {path:someFilePath}, function(err,result){
console.log(result);
});
}); And then for example to instantly add support for sass, stylus, haml, jade, coffeescript, coffeekup, etc it would just be a matter of installing the docpad plugins, so:
This way has several advantages:
They're pretty big pluses in my opinion. The grunt API isn't that intuitive to me, so I'd be happy to work with anyone who wants to write the task. Just shoot me up on Skype (username balupton) or comment here. |
Heya Benjamin! Would you mind opening an issue for this over at http://github.com/gruntjs/grunt-contrib? Depending on how well this is implemented (I don't know anything about docpad yet), this might be able to eliminate/enhance quite a few of our tasks. Both @ctalkington and I can help you with any questions you have about implementing tasks. Also, if you work well by example, there are quite a few well-written ones to draw from on contrib. |
fyi, I've just converted https://github.com/shama/grunt-docs to use DocPad. I'd love to get any feedback on it. Thanks! |
This is more a todo for a custom task, than something for the core.
For the person who wants to get started, we could use the DocPad rendering engine to support all the renderers docpad already supports.
To compile coffeescript it would be something like this (note... I have not yet experimented with the grunt API, so only guessing how it works at this point...)
The text was updated successfully, but these errors were encountered: