Permalink
Browse files

Using updated docs format.

  • Loading branch information...
cowboy committed Oct 18, 2012
1 parent 8ed28dc commit 6b3c7dc2dd660431ad454051ecee4387b920d537
Showing with 71 additions and 71 deletions.
  1. +2 −2 AUTHORS
  2. +3 −1 README.md
  3. +7 −68 docs/{concat.md → concat-examples.md}
  4. +43 −0 docs/concat-options.md
  5. +16 −0 docs/concat-overview.md
View
@@ -1,2 +1,2 @@
-"Cowboy" Ben Alman (http://benalman.com)
-Tyler Kellen (http://goingslowly.com)
+"Cowboy" Ben Alman (http://benalman.com/)
+Tyler Kellen (http://goingslowly.com/)
View
@@ -230,7 +230,9 @@ grunt.initConfig({
-
## Release History
* 2012-10-02 - v0.1.0 - Work in progress, not yet officially released.
+
+--
+Task submitted by <a href="http://benalman.com/">"Cowboy" Ben Alman</a>.
@@ -1,67 +1,6 @@
-### Overview
+# Usage Examples
-In your project's Gruntfile, add a section named `concat` to the data object passed into `grunt.initConfig()`.
-
-```js
-grunt.initConfig({
- concat: {
- options: {
- // Task-specific options go here.
- },
- your_target: {
- // Target-specific file lists and/or options go here.
- },
- },
-})
-```
-
-### Options
-
-#### options.separator
-Type: `String`
-Default value: linefeed
-
-Concatenated files will be joined on this string.
-
-#### options.banner
-Type: `String`
-Default value: 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)_
-
-#### options.stripBanners
-Type: `Boolean`, `Object`
-Default value: `false`
-
-Strip JavaScript banner comments from source files.
-
-* `false` - No comments are stripped.
-* `true` - `/* ... */` block comments are stripped, but _NOT_ `/*! ... */` comments.
-* `options` object:
- * By default, behaves as if `true` were specified.
- * `options.block` - If true, _all_ block comments are stripped.
- * `options.line` - If true, any contiguous _leading_ `//` line comments are stripped.
-
-#### options.process
-Type: `Boolean`, `Object`
-Default value: `false`
-
-Process source files as [templates][] before concatenating.
-
-* `false` - No processing will occur.
-* `true` - Process source files using [grunt.template.process][] defaults.
-* `options` object - Process source files using [grunt.template.process][], using the specified options.
-
-_(Default processing options are explained in the [grunt.template.process][] documentation)_
-
- [templates]: https://github.com/gruntjs/grunt/blob/devel/docs/api_template.md
- [grunt.template.process]: https://github.com/gruntjs/grunt/blob/devel/docs/api_template.md#grunttemplateprocess
-
-### Usage Examples
-
-#### Concatenating with a custom separator
+## Concatenating with a custom separator
In this example, running `grunt concat:dist` (or `grunt concat` because `concat` is a [multi task][] will concatenate the three specified source files (in order), joining files with `;` and writing the output to `dist/built.js`.
@@ -80,7 +19,7 @@ grunt.initConfig({
});
```
-#### Banner comments
+## Banner comments
In this example, running `grunt concat:dist` (or `grunt concat` because `concat` is a [multi task][]) will first strip any preexisting banner comment from the `src/project.js` file, then concatenate the result with a newly-generated banner comment, writing the output to `dist/built.js`.
@@ -106,7 +45,7 @@ grunt.initConfig({
});
```
-#### Multiple targets
+## 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`.
@@ -128,7 +67,7 @@ grunt.initConfig({
});
```
-#### Multiple files per target
+## Multiple files per target
Like the previous example, 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`.
@@ -150,7 +89,7 @@ grunt.initConfig({
});
```
-#### Dynamic filenames
+## Dynamic filenames
Filenames can be generated dynamically by using `<%= %>` delimited underscore templates as filenames.
@@ -169,7 +108,7 @@ grunt.initConfig({
});
```
-#### Advanced dynamic filenames
+## Advanced dynamic filenames
In this more involved example, running `grunt concat` will build two separate files (because `concat` is a [multi task][]). The destination file paths will be expanded dynamically based on the specified templates, recursively if necessary.
View
@@ -0,0 +1,43 @@
+# Options
+
+## options.separator
+Type: `String`
+Default value: linefeed
+
+Concatenated files will be joined on this string.
+
+## options.banner
+Type: `String`
+Default value: 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)_
+
+## options.stripBanners
+Type: `Boolean`, `Object`
+Default value: `false`
+
+Strip JavaScript banner comments from source files.
+
+* `false` - No comments are stripped.
+* `true` - `/* ... */` block comments are stripped, but _NOT_ `/*! ... */` comments.
+* `options` object:
+ * By default, behaves as if `true` were specified.
+ * `options.block` - If true, _all_ block comments are stripped.
+ * `options.line` - If true, any contiguous _leading_ `//` line comments are stripped.
+
+## options.process
+Type: `Boolean`, `Object`
+Default value: `false`
+
+Process source files as [templates][] before concatenating.
+
+* `false` - No processing will occur.
+* `true` - Process source files using [grunt.template.process][] defaults.
+* `options` object - Process source files using [grunt.template.process][], using the specified options.
+
+_(Default processing options are explained in the [grunt.template.process][] documentation)_
+
+ [templates]: https://github.com/gruntjs/grunt/blob/devel/docs/api_template.md
+ [grunt.template.process]: https://github.com/gruntjs/grunt/blob/devel/docs/api_template.md#grunttemplateprocess
View
@@ -0,0 +1,16 @@
+# Overview
+
+In your project's Gruntfile, add a section named `concat` to the data object passed into `grunt.initConfig()`.
+
+```js
+grunt.initConfig({
+ concat: {
+ options: {
+ // Task-specific options go here.
+ },
+ your_target: {
+ // Target-specific file lists and/or options go here.
+ },
+ },
+})
+```

0 comments on commit 6b3c7dc

Please sign in to comment.