grunt-nittro
v0.2.1
Published
Nittro builder Grunt task
Downloads
414
Readme
grunt-nittro
Nittro builder Grunt task
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-nittro --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-nittro');
The "nittro" task
Overview
In your project's Gruntfile, add a section named nittro
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
nittro: {
options: {
vendor: {
js: [
// libraries from other vendors, such as jQuery...
],
css: [
// ... or Twitter Bootstrap etc.
]
},
// Nittro components to include. Note that dependencies are
// added automatically, so if you ask for e.g. the "page"
// component, the "core" and "ajax" packages will be added
// automatically.
base: {
core: true,
datetime: true,
neon: true,
di: true,
ajax: true,
forms: true, // note that including the forms component
// will automatically include the netteForms.js asset
page: true,
flashes: true,
routing: true
},
extras: {
checklist: true,
dialogs: true,
confirm: true,
dropzone: true,
paginator: true,
keymap: true,
storage: true
},
// other libraries to include after Nittro, e.g. your site's
// proprietary libraries and styles
libraries: {
js: [
],
css: [
]
},
bootstrap: true, // true or object = generated bootstrap, otherwise
// provide a path to your custom bootstrap script
stack: true // include the _stack library
},
js: {
dest: "dist/nittro-full.js"
},
css: {
dest: "dist/nittro-full.less"
}
},
});