Created: 2012-03-23 02:39
Updated: 2016-03-18 05:37
License: mit

Grunt "init:commonjs" example

This is example output generated by the "grunt init:commonjs" task.

Note: this repository was generated dynamically using grunt v0.3.8. Instead of reporting issues here, please report any issues with this repository as grunt issues. Instead of watching or forking this repository, watch grunt and use the grunt init task.

Project Creation Transcript

The following is a transcript of the session in which this project and repository were created. This is not actually a part of the grunt "init:commonjs" template, this session transcript was added afterwards. The text after the $ are the commands that were executed, and everything else is program output. If you want to see the repository exactly as it was created by grunt, view the previous commit.

Want to learn more? Check grunt out.

Note that this entire build process is automated by a rather complex expect script, which is used to automate grunt in order to facilitate the creation of this and other init task example repositories.

$ mkdir grunt-commonjs-example && cd grunt-commonjs-example

$ git init
git remote add origin
Initialized empty Git repository in /private/tmp/grunt-commonjs-example/.git/

$ git remote add origin

$ grunt init:commonjs
Running "init:commonjs" (init) task
This task will create one or more files in the current directory, based on the
environment and the answers to a few questions. Note that answering "?" to any
question will show question-specific help and answering "none" to most questions
will leave its value blank.

Please answer the following:
[?] Project name (grunt-commonjs-example) 
[?] Description (The best project ever.) This is example output generated by the "grunt init:commonjs" task.
[?] Version (0.1.0) 
[?] Project git repository (git:// 
[?] Project homepage ( 
[?] Project issues tracker ( 
[?] Licenses (MIT) 
[?] Author name ("Cowboy" Ben Alman) 
[?] Author email (none) 
[?] Author url ( 
[?] What versions of node does it run on? (*) 
[?] Main module/entry point (lib/grunt-commonjs-example) 
[?] Npm test command (grunt test) 
[?] Do you need to make any changes to the above before continuing? (y/N) 

Writing .gitignore...OK
Writing grunt.js...OK
Writing lib/grunt-commonjs-example.js...OK
Writing test/grunt-commonjs-example_test.js...OK

Initialized from template "commonjs".

Done, without errors.

$ tree
├── grunt.js
├── lib
│   └── grunt-commonjs-example.js
├── package.json
└── test
    └── grunt-commonjs-example_test.js

2 directories, 6 files

$ grunt
Running "lint:files" (lint) task
Lint free.

Running "test:files" (test) task
Testing grunt-commonjs-example_test.js.OK
>> 1 assertions passed (1ms)

Running "concat:dist" (concat) task
File "dist/grunt-commonjs-example.js" created.

Running "min:dist" (min) task
File "dist/grunt-commonjs-example.min.js" created.
Uncompressed size: 293 bytes.
Compressed size: 208 bytes gzipped (250 bytes minified).

Done, without errors.

$ tree
├── dist
│   ├── grunt-commonjs-example.js
│   └── grunt-commonjs-example.min.js
├── grunt.js
├── lib
│   └── grunt-commonjs-example.js
├── package.json
└── test
    └── grunt-commonjs-example_test.js

3 directories, 8 files

$ git add .

$ git commit -m 'Committing example "grunt init:commonjs" task output.'
[master (root-commit) 295c791] Committing example "grunt init:commonjs" task output.
 9 files changed, 239 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 LICENSE-MIT
 create mode 100644
 create mode 100644 dist/grunt-commonjs-example.js
 create mode 100644 dist/grunt-commonjs-example.min.js
 create mode 100644 grunt.js
 create mode 100644 lib/grunt-commonjs-example.js
 create mode 100644 package.json
 create mode 100644 test/grunt-commonjs-example_test.js


Copyright (c) 2012 "Cowboy" Ben Alman
Licensed under the MIT license.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more