Use bower for dependencies. Added dotfiles/package files. Fixes #9 #11

Merged
merged 2 commits into from Apr 9, 2013

Projects

None yet

5 participants

@rafshar
Contributor
rafshar commented Apr 9, 2013

This PR should bring everything up to date w/ yeoman 1.0 beta & ember rc2.

  • Updated component.json for jquery 1.9.1, handlebars rc3, ember rc2
  • Use index.js to include dependencies in components.js block
  • Use index.js to include app.js in main.js block
  • Files generate into an /app/ directory like other generators/ember-tools
  • Included dotfiles and package.json that were already in the templates dir
  • Updated readme to include bower install step
  • Updated tests to check for new files
@passy passy commented on an outdated diff Apr 9, 2013
};
-Generator.prototype.indexFile = function createIndexFile() {
- this.template('index.html', 'index.html');
+Generator.prototype.git = function git() {
+ this.copy('gitignore', '.gitignore');
+ this.copy('gitattributes', '.gitattributes');
+};
+
+Generator.prototype.bower = function bower() {
+ this.copy('bowerrc', '.bowerrc');
+ this.copy('component.json', 'component.json');
+};
+
+Generator.prototype.packageFile = function () {
@passy
passy Apr 9, 2013 Member

Could you name the function here too for consistency's sake?

@passy passy and 1 other commented on an outdated diff Apr 9, 2013
};
-Generator.prototype.indexFile = function createIndexFile() {
- this.template('index.html', 'index.html');
+Generator.prototype.git = function git() {
+ this.copy('gitignore', '.gitignore');
+ this.copy('gitattributes', '.gitattributes');
+};
+
+Generator.prototype.bower = function bower() {
+ this.copy('bowerrc', '.bowerrc');
+ this.copy('component.json', 'component.json');
+};
+
+Generator.prototype.packageFile = function () {
+ this.copy('package.json', 'package.json');
@passy
passy Apr 9, 2013 Member

@sindresorhus Other generators use _package.json as filename. Do multiple package.json files in one repository confuse npm?

@rafshar
rafshar Apr 9, 2013 Contributor

I agree, probably best to be safe. I noticed they were renamed in generator-webapp for that reason.

@addyosmani
Member

This looks good for a merge. Thanks for addressing the concerns above!

@addyosmani addyosmani merged commit 4618b29 into deprecate:master Apr 9, 2013

1 check passed

default The Travis build passed
Details
@kevva
Contributor
kevva commented Apr 9, 2013

Maybe we should run bower install automatically like we do in the other generators, or at least prompt a message about the user having to run it.

@intuitivepixel

@kevva good point 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment