Skip to content

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rsvalerio committed Oct 2, 2012
1 parent 0266476 commit 0ce9e84
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 30 deletions.
23 changes: 10 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Grunt Angular Seed.

Boilerplate to generate grunt init plugins that will generate grunt projects.
[Grunt](https://github.com/cowboy/grunt) plugin to generate [Angular-Seed](https://github.com/angular/angular-seed) projects.

This work is based in [Backbone Boilerplate framework tool](https://github.com/backbone-boilerplate/grunt-bbb) from [Tim Branyen](https://github.com/tbranyen)
Created using [Grunt init plugin](https://npmjs.org/package/grunt-init-plugin).

Angular-Seed version v1.0.2 is used.

## Getting Started ##

Expand All @@ -11,30 +13,25 @@ This work is based in [Backbone Boilerplate framework tool](https://github.com/b
$ npm install -g grunt-angular-seed
```

#### Create a new grunt init template ####
#### Create a new AngularJS project ####
``` bash
$ grunt-angular-seed init
```
Answer some questions

#### Add some file in ####
``` bash
$ /tasks/init/grunt-angular-seed/root
```
Done!

#### To run in development environment ####
``` bash
$ npm link
```

#### Using grunt in your new AngularJS project ####
``` bash
$ grunt-angular-seed init
$ grunt
```



## Release History ##

2012/09/09 - v0.1.0 - Preview release
2012/09/16 - v0.1.0 - Initial release


## License
Expand Down
47 changes: 30 additions & 17 deletions tasks/init/grunt-angular-seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,35 @@ exports.warnOn = "*";

exports.template = function(grunt, init, done) {

var _ = grunt.utils._;

// Files to copy (and process).
var files = init.filesToCopy({});

// Remove any git files
_.each(files, function(flag, file) {
if (file.indexOf(".git") === 0) {
delete files[file];
}
var _ = grunt.utils._,
files = {}
;

grunt.helper('prompt', {type: 'grunt'}, [
grunt.helper('prompt_for', 'name'),
grunt.helper('prompt_for', 'version'),
grunt.helper('prompt_for', 'author_name'),
grunt.helper('prompt_for', 'author_email'),
grunt.helper('prompt_for', 'grunt_version'),
grunt.helper('prompt_for', 'node_version', '*')
], function(err, props) {

// Set a few grunt-plugin-specific properties.
props.main = 'grunt.js';
props.npm_test = 'grunt test';
props.bin = 'bin/' + props.name;
props.keywords = ['gruntplugin'];

// Files to copy (and process).
files = init.filesToCopy(props);

// Actually copy (and process) files.
init.copyAndProcess(files, props);

// Generate package.json file.
init.writePackageJSON('package.json', props);

// All done!
done();
});

// Actually copy (and process). files.
init.copyAndProcess(files, {}, {});

// All done!
done();

};

0 comments on commit 0ce9e84

Please sign in to comment.