grunt-swig
grunt-swig copied to clipboard
Customize grunt-swig with additional tags.
I hope to have make this as customizable as possible.
What you can achieve is:
Have a project called XYZ that requires grunt-swig
AND swig-sometag
(as siblings).
XYZ\Gruntfile.js:
grunt.initConfig({
swig: {
documentation: {
dest: 'test/dest',
src: ['**/*.swig', '!templates/*.swig'],
tags: {
sometag: require('swig-sometag')
}
}
}
});
Or you could use a custom swig-tag made by yourself! Just using:
grunt.initConfig({
swig: {
documentation: {
dest: 'test/dest',
src: ['**/*.swig', '!templates/*.swig'],
tags: {
personal: require('./my-personal-tag')
}
}
}
});
Added another commit, this is a refactor, and now the PR also supports swig-extras and swig-extensions
I even added a test using swig-extras, putting it as a dependency in the dev-dependencies, i hope this is not a problem
This looks awesome.
I've been neglecting this package b/c I don't use it any more. I'll try to spend a few hours and get everything updated and push out a shiny new release.
Curious how this would work along side #24