Permalink
Browse files

Fixes #263 - move generators to an external repo, point to tarball in…

…stead.
  • Loading branch information...
1 parent d670566 commit 8ead5103615a2c8a9b44a2e74ecc81e441d2a3c5 @addyosmani addyosmani committed Aug 31, 2012
Showing with 3 additions and 125,450 deletions.
  1. +0 −1 cli/bin/yeoman
  2. +0 −206 cli/lib/generators/actions.js
  3. +0 −12 cli/lib/generators/angular/all/USAGE
  4. +0 −60 cli/lib/generators/angular/all/index.js
  5. +0 −11 cli/lib/generators/angular/controller/USAGE
  6. +0 −20 cli/lib/generators/angular/controller/index.js
  7. +0 −7 cli/lib/generators/angular/readme.md
  8. +0 −19 cli/lib/generators/angular/templates/app.js
  9. +0 −13 cli/lib/generators/angular/templates/controller.js
  10. +0 −10 cli/lib/generators/angular/templates/directives.js
  11. +0 −10 cli/lib/generators/angular/templates/filters.js
  12. +0 −1 cli/lib/generators/angular/templates/partials1.html
  13. +0 −5 cli/lib/generators/angular/templates/partials2.html
  14. +0 −9 cli/lib/generators/angular/templates/services.js
  15. +0 −49 cli/lib/generators/backbone/all/index.js
  16. +0 −18 cli/lib/generators/backbone/app/index.js
  17. +0 −1 cli/lib/generators/backbone/app/templates/.gitattributes
  18. +0 −2 cli/lib/generators/backbone/app/templates/.gitignore
  19. +0 −174 cli/lib/generators/backbone/app/templates/Gruntfile.js
  20. +0 −553 cli/lib/generators/backbone/app/templates/app/.htaccess
  21. +0 −157 cli/lib/generators/backbone/app/templates/app/404.html
  22. BIN cli/lib/generators/backbone/app/templates/app/favicon.ico
  23. +0 −56 cli/lib/generators/backbone/app/templates/app/index.html
  24. +0 −3 cli/lib/generators/backbone/app/templates/app/robots.txt
  25. +0 −38 cli/lib/generators/backbone/app/templates/app/scripts/vendor/backbone-min.js
  26. +0 −2 cli/lib/generators/backbone/app/templates/app/scripts/vendor/jquery.min.js
  27. +0 −41 cli/lib/generators/backbone/app/templates/app/scripts/vendor/lodash.min.js
  28. +0 −1 cli/lib/generators/backbone/app/templates/app/styles/main.css
  29. +0 −7 cli/lib/generators/backbone/app/templates/package.json
  30. +0 −47 cli/lib/generators/backbone/app/templates/test/index.html
  31. +0 −3,464 cli/lib/generators/backbone/app/templates/test/lib/chai.js
  32. +0 −1,202 cli/lib/generators/backbone/app/templates/test/lib/expect.js
  33. +0 −182 cli/lib/generators/backbone/app/templates/test/lib/mocha-1.2.2/mocha.css
  34. +0 −4,494 cli/lib/generators/backbone/app/templates/test/lib/mocha-1.2.2/mocha.js
  35. +0 −41 cli/lib/generators/backbone/app/templates/test/runner/mocha.js
  36. +0 −19 cli/lib/generators/backbone/collection/index.js
  37. +0 −31 cli/lib/generators/backbone/model/index.js
  38. +0 −20 cli/lib/generators/backbone/readme.md
  39. +0 −19 cli/lib/generators/backbone/router/index.js
  40. +0 −14 cli/lib/generators/backbone/templates/app.js
  41. +0 −5 cli/lib/generators/backbone/templates/collection.js
  42. +0 −3 cli/lib/generators/backbone/templates/model.js
  43. +0 −3 cli/lib/generators/backbone/templates/router.js
  44. +0 −2 cli/lib/generators/backbone/templates/view.ejs
  45. +0 −5 cli/lib/generators/backbone/templates/view.js
  46. +0 −20 cli/lib/generators/backbone/view/index.js
  47. +0 −438 cli/lib/generators/base.js
  48. +0 −18 cli/lib/generators/bbb/all/index.js
  49. +0 −18 cli/lib/generators/bbb/all/templates/.editorconfig
  50. +0 −1 cli/lib/generators/bbb/all/templates/.gitattributes
  51. +0 −2 cli/lib/generators/bbb/all/templates/.gitignore
  52. +0 −173 cli/lib/generators/bbb/all/templates/Gruntfile.js
  53. +0 −553 cli/lib/generators/bbb/all/templates/app/.htaccess
  54. +0 −157 cli/lib/generators/bbb/all/templates/app/404.html
  55. BIN cli/lib/generators/bbb/all/templates/app/favicon.ico
  56. +0 −53 cli/lib/generators/bbb/all/templates/app/index.html
  57. +0 −3 cli/lib/generators/bbb/all/templates/app/robots.txt
  58. +0 −83 cli/lib/generators/bbb/all/templates/app/scripts/app.js
  59. +0 −29 cli/lib/generators/bbb/all/templates/app/scripts/config.js
  60. +0 −338 cli/lib/generators/bbb/all/templates/app/scripts/libs/almond.js
  61. +0 −1,431 cli/lib/generators/bbb/all/templates/app/scripts/libs/backbone.js
  62. +0 −9,227 cli/lib/generators/bbb/all/templates/app/scripts/libs/jquery.js
  63. +0 −4,263 cli/lib/generators/bbb/all/templates/app/scripts/libs/lodash.js
  64. +0 −2,041 cli/lib/generators/bbb/all/templates/app/scripts/libs/require.js
  65. +0 −39 cli/lib/generators/bbb/all/templates/app/scripts/main.js
  66. +0 −667 cli/lib/generators/bbb/all/templates/app/scripts/plugins/backbone.layoutmanager.js
  67. +0 −21 cli/lib/generators/bbb/all/templates/app/scripts/router.js
  68. +0 −268 cli/lib/generators/bbb/all/templates/app/styles/h5bp.css
  69. +0 −1 cli/lib/generators/bbb/all/templates/app/styles/index.css
  70. +0 −7 cli/lib/generators/bbb/all/templates/package.json
  71. +0 −21 cli/lib/generators/bbb/all/templates/test/index.html
  72. +0 −3,590 cli/lib/generators/bbb/all/templates/test/lib/chai.js
  73. +0 −1,202 cli/lib/generators/bbb/all/templates/test/lib/expect.js
  74. +0 −199 cli/lib/generators/bbb/all/templates/test/lib/mocha/mocha.css
  75. +0 −4,675 cli/lib/generators/bbb/all/templates/test/lib/mocha/mocha.js
  76. +0 −41 cli/lib/generators/bbb/all/templates/test/runner/mocha.js
  77. +0 −73 cli/lib/generators/bbb/all/templates/test/spec/example.js
  78. +0 −26 cli/lib/generators/bbb/readme.md
  79. BIN cli/lib/generators/chromeapp/all/assets/icon-128.png
  80. +0 −53 cli/lib/generators/chromeapp/all/index.js
  81. +0 −18 cli/lib/generators/chromeapp/all/templates/.editorconfig
  82. +0 −1 cli/lib/generators/chromeapp/all/templates/.gitattributes
  83. +0 −2 cli/lib/generators/chromeapp/all/templates/.gitignore
  84. +0 −174 cli/lib/generators/chromeapp/all/templates/Gruntfile.js
  85. +0 −553 cli/lib/generators/chromeapp/all/templates/app/.htaccess
  86. +0 −13 cli/lib/generators/chromeapp/all/templates/app/index.html
  87. +0 −10 cli/lib/generators/chromeapp/all/templates/app/main.js
  88. +0 −14 cli/lib/generators/chromeapp/all/templates/app/manifest.json
  89. +0 −3 cli/lib/generators/chromeapp/all/templates/app/robots.txt
  90. +0 −1 cli/lib/generators/chromeapp/all/templates/app/styles/main.css
  91. +0 −7 cli/lib/generators/chromeapp/all/templates/package.json
  92. +0 −47 cli/lib/generators/chromeapp/all/templates/test/index.html
  93. +0 −3,590 cli/lib/generators/chromeapp/all/templates/test/lib/chai.js
  94. +0 −1,202 cli/lib/generators/chromeapp/all/templates/test/lib/expect.js
  95. +0 −199 cli/lib/generators/chromeapp/all/templates/test/lib/mocha/mocha.css
  96. +0 −4,675 cli/lib/generators/chromeapp/all/templates/test/lib/mocha/mocha.js
  97. +0 −41 cli/lib/generators/chromeapp/all/templates/test/runner/mocha.js
  98. +0 −9 cli/lib/generators/chromeapp/readme.md
  99. +0 −50 cli/lib/generators/ember-starter/all/index.js
  100. +0 −33 cli/lib/generators/ember-starter/readme.md
  101. +0 −174 cli/lib/generators/ember-starter/templates/Gruntfile.js
  102. +0 −36 cli/lib/generators/ember-starter/templates/index.html
  103. +0 −7 cli/lib/generators/ember-starter/templates/scripts/app.js
  104. +0 −20,709 cli/lib/generators/ember-starter/templates/scripts/libs/ember-1.0.pre.js
  105. +0 −1,550 cli/lib/generators/ember-starter/templates/scripts/libs/handlebars-1.0.0.beta.6.js
  106. +0 −4 cli/lib/generators/ember-starter/templates/scripts/libs/jquery-1.7.2.min.js
  107. +0 −141 cli/lib/generators/ember-starter/templates/styles/style.css
  108. +0 −14 cli/lib/generators/ember/all/USAGE
  109. +0 −57 cli/lib/generators/ember/all/index.js
  110. +0 −18 cli/lib/generators/ember/app/index.js
  111. +0 −1 cli/lib/generators/ember/app/templates/.gitattributes
  112. +0 −2 cli/lib/generators/ember/app/templates/.gitignore
  113. +0 −174 cli/lib/generators/ember/app/templates/Gruntfile.js
  114. +0 −553 cli/lib/generators/ember/app/templates/app/.htaccess
  115. +0 −157 cli/lib/generators/ember/app/templates/app/404.html
  116. BIN cli/lib/generators/ember/app/templates/app/favicon.ico
  117. +0 −58 cli/lib/generators/ember/app/templates/app/index.html
  118. +0 −3 cli/lib/generators/ember/app/templates/app/robots.txt
  119. +0 −18 cli/lib/generators/ember/app/templates/app/scripts/vendor/ember-1.0.pre.min.js
  120. +0 −1,550 cli/lib/generators/ember/app/templates/app/scripts/vendor/handlebars-1.0.0.beta.6.js
  121. +0 −2 cli/lib/generators/ember/app/templates/app/scripts/vendor/jquery.min.js
  122. +0 −1 cli/lib/generators/ember/app/templates/app/styles/main.css
  123. +0 −7 cli/lib/generators/ember/app/templates/package.json
  124. +0 −47 cli/lib/generators/ember/app/templates/test/index.html
  125. +0 −3,464 cli/lib/generators/ember/app/templates/test/lib/chai.js
  126. +0 −1,202 cli/lib/generators/ember/app/templates/test/lib/expect.js
  127. +0 −182 cli/lib/generators/ember/app/templates/test/lib/mocha-1.2.2/mocha.css
  128. +0 −4,494 cli/lib/generators/ember/app/templates/test/lib/mocha-1.2.2/mocha.js
  129. +0 −41 cli/lib/generators/ember/app/templates/test/runner/mocha.js
  130. +0 −8 cli/lib/generators/ember/controller/USAGE
  131. +0 −30 cli/lib/generators/ember/controller/index.js
  132. +0 −8 cli/lib/generators/ember/model/USAGE
  133. +0 −31 cli/lib/generators/ember/model/index.js
  134. +0 −38 cli/lib/generators/ember/readme.md
  135. +0 −3 cli/lib/generators/ember/templates/app.js
  136. +0 −3 cli/lib/generators/ember/templates/application.handlebars
  137. +0 −7 cli/lib/generators/ember/templates/array_controller.js
  138. +0 −4 cli/lib/generators/ember/templates/controller.js
  139. +0 −5 cli/lib/generators/ember/templates/model.js
  140. +0 −15 cli/lib/generators/ember/templates/router.js
  141. +0 −5 cli/lib/generators/ember/templates/store.js
  142. +0 −5 cli/lib/generators/ember/templates/view.handlebars
  143. +0 −3 cli/lib/generators/ember/templates/view.js
  144. +0 −9 cli/lib/generators/ember/view/USAGE
  145. +0 −20 cli/lib/generators/ember/view/index.js
  146. +0 −487 cli/lib/generators/index.js
  147. +0 −21 cli/lib/generators/jasmine/app/index.js
  148. +0 −55 cli/lib/generators/jasmine/app/templates/index.html
  149. +0 −20 cli/lib/generators/jasmine/app/templates/lib/jasmine-1.2.0/MIT.LICENSE
  150. +0 −616 cli/lib/generators/jasmine/app/templates/lib/jasmine-1.2.0/jasmine-html.js
  151. +0 −81 cli/lib/generators/jasmine/app/templates/lib/jasmine-1.2.0/jasmine.css
  152. +0 −2,529 cli/lib/generators/jasmine/app/templates/lib/jasmine-1.2.0/jasmine.js
  153. +0 −21 cli/lib/generators/jasmine/app/templates/runner/headless.js
  154. +0 −57 cli/lib/generators/jasmine/app/templates/runner/html.js
  155. +0 −757 cli/lib/generators/jasmine/app/templates/spec/introduction.js
  156. +0 −44 cli/lib/generators/mocha/app/index.js
  157. +0 −47 cli/lib/generators/mocha/app/templates/index.html
  158. +0 −3,590 cli/lib/generators/mocha/app/templates/lib/chai.js
  159. +0 −1,202 cli/lib/generators/mocha/app/templates/lib/expect.js
  160. +0 −199 cli/lib/generators/mocha/app/templates/lib/mocha/mocha.css
  161. +0 −4,675 cli/lib/generators/mocha/app/templates/lib/mocha/mocha.js
  162. +0 −41 cli/lib/generators/mocha/app/templates/runner/mocha.js
  163. +0 −11 cli/lib/generators/named-base.js
  164. +0 −18 cli/lib/generators/quickstart/all/index.js
  165. +0 −18 cli/lib/generators/quickstart/all/templates/.editorconfig
  166. +0 −1 cli/lib/generators/quickstart/all/templates/.gitattributes
  167. +0 −2 cli/lib/generators/quickstart/all/templates/.gitignore
  168. +0 −174 cli/lib/generators/quickstart/all/templates/Gruntfile.js
  169. +0 −553 cli/lib/generators/quickstart/all/templates/app/.htaccess
  170. +0 −157 cli/lib/generators/quickstart/all/templates/app/404.html
  171. BIN cli/lib/generators/quickstart/all/templates/app/favicon.ico
  172. +0 −52 cli/lib/generators/quickstart/all/templates/app/index.html
  173. +0 −3 cli/lib/generators/quickstart/all/templates/app/robots.txt
  174. +0 −2 cli/lib/generators/quickstart/all/templates/app/scripts/vendor/jquery.min.js
  175. +0 −4 cli/lib/generators/quickstart/all/templates/app/scripts/vendor/modernizr.min.js
  176. +0 −1 cli/lib/generators/quickstart/all/templates/app/styles/main.css
  177. +0 −7 cli/lib/generators/quickstart/all/templates/package.json
  178. +0 −47 cli/lib/generators/quickstart/all/templates/test/index.html
  179. +0 −3,590 cli/lib/generators/quickstart/all/templates/test/lib/chai.js
  180. +0 −1,202 cli/lib/generators/quickstart/all/templates/test/lib/expect.js
  181. +0 −199 cli/lib/generators/quickstart/all/templates/test/lib/mocha/mocha.css
  182. +0 −4,675 cli/lib/generators/quickstart/all/templates/test/lib/mocha/mocha.js
  183. +0 −41 cli/lib/generators/quickstart/all/templates/test/runner/mocha.js
  184. 0 cli/lib/generators/quickstart/all/templates/test/spec/.gitkeep
  185. +0 −21 cli/lib/generators/quickstart/readme.md
  186. +0 −381 cli/lib/generators/readme.md
  187. +0 −29 cli/lib/generators/sass/app/index.js
  188. +0 −172 cli/lib/generators/wiring.js
  189. +0 −9 cli/lib/generators/yeoman/app/USAGE
  190. +0 −344 cli/lib/generators/yeoman/app/index.js
  191. +0 −185 cli/lib/generators/yeoman/app/templates/Gruntfile.js
  192. +0 −5,624 cli/lib/generators/yeoman/app/templates/bootstrap.css
  193. +0 −18 cli/lib/generators/yeoman/app/templates/editorconfig
  194. BIN cli/lib/generators/yeoman/app/templates/favicon.ico
  195. +0 −1 cli/lib/generators/yeoman/app/templates/gitattributes
  196. +0 −2 cli/lib/generators/yeoman/app/templates/gitignore
  197. +0 −7 cli/lib/generators/yeoman/app/templates/package.json
  198. +0 −20 cli/lib/generators/yeoman/controller/index.js
  199. +0 −11 cli/lib/generators/yeoman/generator/USAGE
  200. +0 −19 cli/lib/generators/yeoman/generator/index.js
  201. +0 −8 cli/lib/generators/yeoman/generator/templates/USAGE
  202. +0 −19 cli/lib/generators/yeoman/generator/templates/index.js
  203. 0 cli/lib/generators/yeoman/generator/templates/templates/.empty_directory
  204. +0 −21 cli/lib/generators/yeoman/js/USAGE
  205. +0 −17 cli/lib/generators/yeoman/js/index.js
  206. 0 cli/lib/generators/yeoman/js/templates/.empty_directory
  207. +0 −104 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-affix.js
  208. +0 −90 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-alert.js
  209. +0 −12 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-all.js
  210. +0 −96 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-button.js
  211. +0 −176 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-carousel.js
  212. +0 −158 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-collapse.js
  213. +0 −150 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-dropdown.js
  214. +0 −239 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-modal.js
  215. +0 −103 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-popover.js
  216. +0 −151 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-scrollspy.js
  217. +0 −135 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-tab.js
  218. +0 −275 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-tooltip.js
  219. +0 −60 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-transition.js
  220. +0 −300 cli/lib/generators/yeoman/js/templates/bootstrap/bootstrap-typeahead.js
  221. +0 −18 cli/lib/generators/yeoman/js/templates/main/main.js
  222. +0 −2,508 cli/lib/generators/yeoman/js/templates/requirejs/esprima.js
  223. +0 −459 cli/lib/generators/yeoman/js/templates/requirejs/hm.js
  224. +0 −2,037 cli/lib/generators/yeoman/js/templates/requirejs/require.js
  225. +2 −1 cli/package.json
  226. +1 −1 cli/yeoman.js
View
@@ -5,7 +5,6 @@ var fs = require('fs'),
colors = require('colors'),
path = require('path'),
prompt = require('prompt'),
- actions = require('../lib/generators/actions.js'),
insight = require('../lib/plugins/insight.js'),
updater = require('../lib/plugins/updater.js'),
yeoman = require('../'),
@@ -1,206 +0,0 @@
-var fs = require('fs'),
- path = require('path'),
- grunt = require('grunt'),
- fetch = require('../utils/fetch'),
- _ = grunt.util._;
-
-// The action mixin is comprised of Grunt's file, log, helper and prompt API,
-// and made available for generators to use as instance methods directly for
-// the file API, and through the `log` property for the log API.
-
-var actions = module.exports;
-
-// File API
-// --------
-// 1:1 relationship with grunt.file.
-_.extend(actions, grunt.file);
-
-// Helper API
-// ----------
-// 1:1 relationship with grunt.helper
-actions.helper = grunt.helper;
-
-// Prompts API
-// -----------
-// 1:1 relationship with grunt.helpers for prompt, prompt_for, and
-// prompt_for_obj
-actions.prompt = grunt.helper.bind(grunt, 'prompt');
-actions.promptFor = grunt.helper.bind(grunt, 'prompt_for');
-actions.promptForObj = grunt.helper.bind(grunt, 'prompt_for_obj');
-
-// Log API
-// -------
-// as self.log property. 1:1 relationship with grunt.log
-actions.log = grunt.log;
-
-// Internal API
-// ------------
-// Specifics of our generator API, additonal logic and tweaks to file behaviour
-// and so on.
-
-// Stores and return the source root for this class
-actions.sourceRoot = function sourceRoot(root) {
- if( root ) {
- this._sourceRoot = path.resolve( root );
- }
-
- return this._sourceRoot;
-};
-
-// Sets the destination root for this class. Relatives path are added to the
-// directory where the script was invoked and expanded.
-actions.destinationRoot = function destinationRoot(root) {
- if( root ) {
- this._destinationRoot = path.resolve( root );
-
- if ( !path.existsSync( root ) ) {
- this.mkdir( root );
- }
-
- process.chdir( root );
- }
-
- return this._destinationRoot || './';
-};
-
-// Make some of the file API aware of our source / destination root paths.
-// copy, template, write and alike consider:
-//
-// - the source path to be relative to generator's `templates/` directory.
-// - the destination path to be relative to application Gruntfile's directory
-// (most likely cwd)
-actions.copy = function copy(source, destination, options) {
- source = this.isPathAbsolute(source) ? source : path.join(this.sourceRoot(), source);
- grunt.option('verbose', true);
- grunt.file.copy(source, destination, options);
- grunt.option('verbose', false);
- return this;
-};
-
-actions.read = function read(source, encoding) {
- source = this.isPathAbsolute(source) ? source : path.join(this.sourceRoot(), source);
- return grunt.file.read(source, encoding);
-};
-
-actions.write = function write(filepath, content) {
- grunt.option('verbose', true);
- grunt.file.write(filepath, content);
- grunt.option('verbose', false);
- return this;
-};
-
-// Gets an underscore template at the relative source, executes it and makes a copy
-// at the relative destination. If the destination is not given it's assumed
-// to be equal to the source relative to destination.
-actions.template = function template(source, destination, data) {
- // data is meant to be the whole instance for now. Will change.
- data = data || this;
- destination = destination || source;
-
- var body = grunt.template.process(this.read(source), data);
- this.write(destination, body);
- return this;
-};
-
-// Copies recursively the files from source directory to root directory
-actions.directory = function directory(source, destination, noProcess) {
- var self = this,
- root = path.join(this.sourceRoot(), source),
- list = grunt.file.expandFiles({ dot: true }, path.join(root, '**'));
-
- destination = destination || source;
-
- // get the path relative to the template root, and copy to the relative destination
- list.forEach(function(filepath) {
- var src = filepath.slice(root.length),
- dest = path.join(destination, src);
-
- self.log.write('Writing ' + dest + '...');
- grunt.file.copy(filepath, dest, {
- process: function(content) {
- return noProcess ? content : grunt.template.process(content, self);
- }
- });
- self.log.ok();
- });
-};
-
-// Fetch a remote tarball, and untar at the given location
-actions.tarball = fetch;
-
-// Download a single file at the given destination.
-actions.fetch = function(url, destination, cb) {
- this.mkdir(path.dirname(destination));
-
- var log = this.log.write('Fetching ' + url + '...');
-
- fetch.request(url)
- .on('error', cb)
- .on('data', log.write.bind(log, '.'))
- .pipe(fs.createWriteStream(destination))
- .on('error', cb)
- .on('close', function() {
- log.ok()
- .write('Writing ' + destination + '...')
- .ok();
- })
- .on('close', cb);
-};
-
-// Remotely fetch a package on github, store this into a _cache folder,
-// and provide a "remote" object as an a facade API to ourself (part of
-// genrator API, copy, template, directory)
-actions.remote = function(username, repo, branch, cb) {
- if(!cb) { cb = branch; branch = 'master'; }
-
- var self = this,
- cache = path.join(process.env.HOME || process.env.USERPROFILE, '.yeoman/cache', username, repo, branch),
- url = 'http://nodeload.github.com/' + [username, repo, 'tarball', branch].join('/');
-
- fs.stat(cache, function(err) {
- // already cached
- if ( !err ) {
- return done();
- }
- // first time fetch
- self.tarball(url, cache, done);
- });
-
- // XXX remote should probably be in its own file,
- function done(err) {
- if ( err ) {
- return cb( err );
- }
-
- var files = grunt.file.expandFiles(path.join(cache, '**')).map(function(filepath) {
- return filepath.slice(cache.length + 1);
- });
-
- var remote = {};
-
- remote.copy = function copy(source, destination, options) {
- source = path.join(cache, source);
- self.copy(source, destination, options);
- return this;
- };
-
- remote.template = function template(source, destination, data) {
- // data is meant to be the whole instance for now. Will change.
- data = data || self;
- destination = destination || source;
- source = path.join(cache, source);
-
- var body = grunt.template.process(grunt.file.read(source), data);
- self.write(destination, body);
- };
-
- remote.directory = function directory(source, destination) {
- var root = self.sourceRoot();
- self.sourceRoot(cache);
- self.directory(source, destination);
- self.sourceRoot(root);
- };
-
- cb(err, remote, files);
- }
-};
@@ -1,12 +0,0 @@
-Description:
- Creates a default Angular folder layout in app/scripts/
-
-Example:
- yeoman generate bootstrap Thing
-
- This will create:
- app/scripts/app.js
- app/scripts/controllers/
- app/scripts/helpers/
- app/scripts/templates/
-
@@ -1,60 +0,0 @@
-
-var path = require('path'),
- util = require('util'),
- yeoman = require('../../../../');
-
-module.exports = Generator;
-
-function Generator() {
- yeoman.generators.Base.apply(this, arguments);
- this.sourceRoot(path.join(__dirname, '../templates'));
-
- this.dirs = 'controllers helpers templates'.split(' ');
-
- // should we figure it out automatically? and made available through an
- // appname property, function of something.
- this.appname = path.basename(process.cwd());
-
- this.hookFor('angular:controller', {
- args: [ 'application' ]
- });
-
-}
-
-util.inherits(Generator, yeoman.generators.Base);
-
-Generator.prototype.injectAngular = function injectAngular() {
- // noop for now, but here we might add necessary content to necessary file to
- // wire up the framework.
-};
-
-Generator.prototype.createDirLayout = function createDirLayout() {
- var self = this;
- this.dirs.forEach(function(dir) {
- self.log.write('Creating app/scripts/' + dir + ' directory...');
- self.mkdir(path.join('app/scripts', dir));
- self.log.ok();
- });
-};
-
-Generator.prototype.createAppFile = function createAppFile() {
- this.template('app.js', 'app/scripts/' + this.appname + '.js');
-};
-
-Generator.prototype.createFiltersFile = function createFiltersFile() {
- this.template('filters.js', 'app/scripts/filters.js');
-};
-
-Generator.prototype.createServicesFile = function createServicesFile() {
- this.template('services.js', 'app/scripts/services.js');
-};
-
-Generator.prototype.createDirectivesFile = function createDirectivesFile() {
- this.template('directives.js', 'app/scripts/directives.js');
-};
-
-
-Generator.prototype.createPartialsFile = function createPartialsFile() {
- this.template('partials1.html', 'app/partials/partials1.html');
- this.template('partials2.html', 'app/partials/partials2.html');
-};
@@ -1,11 +0,0 @@
-Options:
- --array # Create an Angular controller to represent multiple objects
-
-Description:
- Creates a new Angular controller
-
-Example:
- yeoman generate controller Thing
-
- This will create:
- app/scripts/controllers/thing-controller.js
@@ -1,20 +0,0 @@
-
-var path = require('path'),
- util = require('util'),
- yeoman = require('../../../../');
-
-module.exports = Generator;
-
-function Generator() {
- yeoman.generators.NamedBase.apply(this, arguments);
- this.sourceRoot(path.join(__dirname, '../templates'));
-
-
- this.appname = path.basename(process.cwd());
-}
-
-util.inherits(Generator, yeoman.generators.NamedBase);
-
-Generator.prototype.createControllerFiles = function createControllerFiles() {
- this.template('controller.js', 'app/scripts/controller.js');
-};
@@ -1,7 +0,0 @@
-AngularJS generator for Yeoman
-
-Based on https://github.com/angular/angular-seed/
-
-Usage:
-
-`yeoman init angular`
@@ -1,19 +0,0 @@
-
-
-//= require_tree ./controllers
-//= require_tree ./helpers
-//= require_tree ./templates
-//= require_self
-
-// The angular application is created elsewhere (application.js)
-// where this file is required through the pipeline
-
-'use strict';
-
-// Declare app level module which depends on filters, and services
-angular.module(<%= grunt.util._.camelize(appname) %>, ['<%= grunt.util._.camelize(appname) %>.filters', '<%= grunt.util._.camelize(appname) %>.services', '<%= grunt.util._.camelize(appname) %>.directives']).
- config(['$routeProvider', function($routeProvider) {
- $routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: MyCtrl1});
- $routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: MyCtrl2});
- $routeProvider.otherwise({redirectTo: '/view1'});
- }]);
@@ -1,13 +0,0 @@
-
-'use strict';
-
-/* <%= _.camelize(appname) %>.<%= _.classify(name) %> Controllers */
-
-
-function MyCtrl1() {}
-MyCtrl1.$inject = [];
-
-
-function MyCtrl2() {
-}
-MyCtrl2.$inject = [];
@@ -1,10 +0,0 @@
-'use strict';
-
-/* Directives */
-
-angular.module('<%= _.camelize(appname) %>.directives', []).
- directive('appVersion', ['version', function(version) {
- return function(scope, elm, attrs) {
- elm.text(version);
- };
- }]);
@@ -1,10 +0,0 @@
-'use strict';
-
-/* Filters */
-
-angular.module('<%= _.camelize(appname) %>.filters', []).
- filter('interpolate', ['version', function(version) {
- return function(text) {
- return String(text).replace(/\%VERSION\%/mg, version);
- }
- }]);
@@ -1 +0,0 @@
-<p>This is the partial for view 1.</p>
@@ -1,5 +0,0 @@
-<p>This is the partial for view 2.</p>
-<p>
- Showing of 'interpolate' filter:
- {{ 'Current version is v%VERSION%.' | interpolate }}
-</p>
Oops, something went wrong.

0 comments on commit 8ead510

Please sign in to comment.