Browse files

readme updated

  • Loading branch information...
1 parent 0266476 commit 0ce9e847b35081b08ab6fd8d0776ce07a7d5522c @rsvalerio committed Oct 2, 2012
Showing with 40 additions and 30 deletions.
  1. +10 −13 readme.md
  2. +30 −17 tasks/init/grunt-angular-seed.js
View
23 readme.md
@@ -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 ##
@@ -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
View
47 tasks/init/grunt-angular-seed.js
@@ -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.