grunt-gluejs2
v0.3.0
Published
A Grunt plugin for GlueJS v2.2+.
Downloads
10
Readme
grunt-gluejs2
A Grunt plugin for GlueJS v2.2+.
Getting Started
This plugin requires Grunt ~0.4.1
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-gluejs2 --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-gluejs2');
The "gluejs" task
Overview
In your project's Gruntfile, add a section named gluejs
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
gluejs: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
}
}
})
Options
Please consult the documentation of GlueJS for details about all available options at http://mixu.net/gluejs/. This plugin supports all options of version 2.2.
options.banner
Type String
Default value ''
The text to use as a banner. Templated strings are perfectly acceptable and encouraged.
options.footer
Type String
Default value ''
The text to use as a footer. Templated strings are perfectly acceptable and encouraged.
Usage examples
Basic Use
In this example, grunt gluejs
(or more verbosely, grunt gluejs:app
) will package recursively every file in the directory public/scripts
to one single file: public/app.js
. The package will be available in a browser environement under one single global variable: App
.
// Project configuration.
grunt.initConfig({
gluejs: {
app: {
options: {
export: 'App'
},
src: 'public/scripts/**/*.js',
dest: 'public/app.js'
}
}
});
Release History
- 2014-02-15 v0.3.0 Fixed cache option.
- 2014-01-04 v0.2.0 Fixed invalid versioning.
- 2014-01-04 v0.1.0 Initial NPM release.
- 2014-01-04 v0.0.1 Initial release.
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright
Copyright (c) 2014 Bert Willems and contributors.
License
This project is licensed under MIT. Refer to LICENCE for more information.