Grunt plugin that compiles Kit files
npm install grunt-codekit

!PR time]
!Issue time]
``shell`
npm install grunt-codekit --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js`
grunt.loadNpmTasks('grunt-codekit');
The plugin supports compiling templates written using the Kit language of CodeKit™. You can use both short form
and long form when specifying input and output destination.
Using short form (see below), the output files will be placed in the dest directory.html
and have the same names as the input files, only using a extension. When using
the long form you can explicitly specify the full name and path of each output file.
There is nothing in the way of mixing and matching the two styles.
#### Configuration options
As with all Grunt plugins, you can specify an options object, either for all tasks
or for each task. There is currently just one option:
- compilePrefixed - Files starting with an underscore (such as _header.kit), false
so called partials, are normally not considered for compilation. By setting this option
to true you can override this setting and still compile these files (default ).
Do remember that Grunt has a [lot of fancy ways of doing file system manipulation]
(http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically) for you
#### Example configuration
`js
grunt.initConfig({
codekit: {
globbed_example_config : {
src : 'templates/*/.kit',
dest : 'build/html/'
},
explicit_output_names: {
files : {
'build/index.html' : '/templates/my_special_index.kit'
}
},
build_with_underscored_files : {
options : { compilePrefixed : true },
files : {
'build/about.html' : '_about.kit',
'build/index.html' : '_index.kit'
}
},
// see http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
dynamic_file_object: {
files: [{
expand: true,
cwd: 'sources',
src: ['*/.kit'],
dest: 'build',
ext: '.html'
}
});
`
You still need a way of embedding that CSS, though, and one way of doing that is using the Kit language. An
example on how this kit file might look is as follows
`