passion-version v0.1.1
passion-version
support passion.js version control
Getting Started
This plugin requires Grunt.
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 passion-version --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('passion-version');
The "passion_version" task
Overview
In your project's Gruntfile, add a section named passion_version
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
passion_version: {
your_target: {
// js file lists.
},
},
passion_version_after: {
your_target: {
// Target-specific html file lists.
},
}
})
Usage Examples
Default Options
In this example, the default options are used to do something with whatever. if there are two files 'abc.123' and def.testing in 'test/fixures/', and there's a string '/ passion_version /' in index.html. then the '/ passion_version /' in index.html will be placed by 'var ver = {'text/fixures/123': 'abc', 'text/fixures/testing': def};'.
grunt.initConfig({
passion_version: {
default_options: {
src: ['test/fixtures/*']
}
},
// Configuration to be run (and then tested).
passion_version_after: {
default_options: {
src: ['*.html']
}
}
})
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.
Release History
(Nothing yet)
License
Copyright (c) 2015 Nonesome. Licensed under the MIT license.