Permalink
Browse files

version bump

  • Loading branch information...
1 parent bb033bd commit d7c611666c5fbe72a493a9e0ea2afaa48dad1aab @tkellen tkellen committed Feb 22, 2013
Showing with 28 additions and 34 deletions.
  1. +4 −0 CHANGELOG
  2. +1 −0 Gruntfile.js
  3. +8 −27 README.md
  4. +12 −4 docs/concat-options.md
  5. +1 −1 package.json
  6. +1 −1 test/concat_test.js
  7. +1 −1 test/expected/custom_options
View
@@ -1,3 +1,7 @@
+v0.1.3:
+ date: 2013-02-22
+ changes:
+ - Support footer option.
v0.1.2:
date: 2013-02-15
changes:
View
@@ -40,6 +40,7 @@ module.exports = function(grunt) {
options: {
separator: '\n;\n',
banner: '/* THIS TEST IS <%= banner_property %> */\n',
+ footer: 'dude'
},
files: {
'tmp/custom_options': ['test/fixtures/file1', 'test/fixtures/file2']
View
@@ -29,29 +29,29 @@ Task targets, files and options may be specified according to the grunt [Configu
### Options
#### separator
-Type: `String`
+Type: `String`
Default: linefeed
Concatenated files will be joined on this string. If you're post-processing concatenated JavaScript files with a minifier, you may need to use a semicolon `';'` as the separator.
#### banner
-Type: `String`
+Type: `String`
Default: empty string
This string will be prepended to the beginning of the concatenated output. It is processed using [grunt.template.process][], using the default options.
_(Default processing options are explained in the [grunt.template.process][] documentation)_
-#### footer
-Type: `String`
+###### footer
+Type: `String`
Default: empty string
This string will be appended to the end of the concatenated output. It is processed using [grunt.template.process][], using the default options.
_(Default processing options are explained in the [grunt.template.process][] documentation)_
#### stripBanners
-Type: `Boolean` `Object`
+Type: `Boolean` `Object`
Default: `false`
Strip JavaScript banner comments from source files.
@@ -64,7 +64,7 @@ Strip JavaScript banner comments from source files.
* `line` - If true, any contiguous _leading_ `//` line comments are stripped.
#### process
-Type: `Boolean` `Object`
+Type: `Boolean` `Object`
Default: `false`
Process source files as [templates][] before concatenating.
@@ -125,26 +125,6 @@ grunt.initConfig({
});
```
-#### Wrap the output
-
-In this example, we can concatenate our script files and the output will be wraped in an if-statement, writing the output to `dist/myApp.js`. This can be useful in case you don't want to process the script if it's allready loaded and initialized.
-
-```js
-// Project configuration.
-grunt.initConfig({
- concat: {
- options: {
- banner: "if(typeof myApp === 'undefined'){",
- footer: "}"
- },
- dist: {
- src: ['src/myApp.js', 'src/myApp.UI.js', 'src/myApp.data.js'],
- dest: 'dist/myApp.js'
- }
- }
-});
-```
-
#### Multiple targets
In this example, running `grunt concat` will build two separate files. One "basic" version, with the main file essentially just copied to `dist/basic.js`, and another "with_extras" concatenated version written to `dist/with_extras.js`.
@@ -238,6 +218,7 @@ grunt.initConfig({
## Release History
+ * 2013-02-21   v0.1.3   Support footer option.
* 2013-02-14   v0.1.2   First official release for Grunt 0.4.0.
* 2013-01-17   v0.1.2rc6   Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
* 2013-01-08   v0.1.2rc5   Updating to work with grunt v0.4.0rc5. Switching back to this.files api.
@@ -248,4 +229,4 @@ grunt.initConfig({
Task submitted by ["Cowboy" Ben Alman](http://benalman.com/)
-*This file was generated on Wed Feb 20 2013 12:35:44.*
+*This file was generated on Fri Feb 22 2013 09:32:37.*
View
@@ -1,21 +1,29 @@
# Options
## separator
-Type: `String`
+Type: `String`
Default: linefeed
Concatenated files will be joined on this string. If you're post-processing concatenated JavaScript files with a minifier, you may need to use a semicolon `';'` as the separator.
## banner
-Type: `String`
+Type: `String`
Default: empty string
This string will be prepended to the beginning of the concatenated output. It is processed using [grunt.template.process][], using the default options.
_(Default processing options are explained in the [grunt.template.process][] documentation)_
+#### footer
+Type: `String`
+Default: empty string
+
+This string will be appended to the end of the concatenated output. It is processed using [grunt.template.process][], using the default options.
+
+_(Default processing options are explained in the [grunt.template.process][] documentation)_
+
## stripBanners
-Type: `Boolean` `Object`
+Type: `Boolean` `Object`
Default: `false`
Strip JavaScript banner comments from source files.
@@ -28,7 +36,7 @@ Strip JavaScript banner comments from source files.
* `line` - If true, any contiguous _leading_ `//` line comments are stripped.
## process
-Type: `Boolean` `Object`
+Type: `Boolean` `Object`
Default: `false`
Process source files as [templates][] before concatenating.
View
@@ -1,7 +1,7 @@
{
"name": "grunt-contrib-concat",
"description": "Concatenate files.",
- "version": "0.1.2",
+ "version": "0.1.3",
"homepage": "https://github.com/gruntjs/grunt-contrib-concat",
"author": {
"name": "Grunt Team",
View
@@ -18,7 +18,7 @@ exports.concat = {
var actual = grunt.file.read('tmp/custom_options');
var expected = grunt.file.read('test/expected/custom_options');
- test.equal(actual, expected, 'should utilize custom banner and separator.');
+ test.equal(actual, expected, 'should utilize custom banner, footer and separator.');
test.done();
},
@@ -1,4 +1,4 @@
/* THIS TEST IS AWESOME */
file1
;
-file2
+file2dude

0 comments on commit d7c6116

Please sign in to comment.