@@ -97,6 +97,7 @@ var Generator = module.exports = function Generator(args, options) {
97
97
} ) ;
98
98
99
99
this . pkg = require ( '../package.json' ) ;
100
+ this . sourceRoot ( path . join ( __dirname , '../templates/common' ) ) ;
100
101
} ;
101
102
102
103
util . inherits ( Generator , yeoman . generators . Base ) ;
@@ -219,21 +220,21 @@ Generator.prototype.askForModules = function askForModules() {
219
220
220
221
Generator . prototype . readIndex = function readIndex ( ) {
221
222
this . ngRoute = this . env . options . ngRoute ;
222
- this . indexFile = this . engine ( this . read ( '../../templates/common /index.html' ) , this ) ;
223
+ this . indexFile = this . engine ( this . read ( 'app /index.html' ) , this ) ;
223
224
} ;
224
225
225
226
Generator . prototype . bootstrapFiles = function bootstrapFiles ( ) {
226
227
var sass = this . compass ;
227
228
var mainFile = 'main.' + ( sass ? 's' : '' ) + 'css' ;
228
229
229
230
if ( this . bootstrap && ! sass ) {
230
- this . copy ( 'fonts/glyphicons-halflings-regular.eot' , ' app/fonts/glyphicons-halflings-regular.eot') ;
231
- this . copy ( 'fonts/glyphicons-halflings-regular.ttf' , ' app/fonts/glyphicons-halflings-regular.ttf') ;
232
- this . copy ( 'fonts/glyphicons-halflings-regular.svg' , ' app/fonts/glyphicons-halflings-regular.svg') ;
233
- this . copy ( 'fonts/glyphicons-halflings-regular.woff' , ' app/fonts/glyphicons-halflings-regular.woff') ;
231
+ this . copy ( 'app/fonts/glyphicons-halflings-regular.eot' ) ;
232
+ this . copy ( 'app/fonts/glyphicons-halflings-regular.ttf' ) ;
233
+ this . copy ( 'app/fonts/glyphicons-halflings-regular.svg' ) ;
234
+ this . copy ( 'app/fonts/glyphicons-halflings-regular.woff' ) ;
234
235
}
235
236
236
- this . copy ( 'styles/' + mainFile , ' app/styles/' + mainFile ) ;
237
+ this . copy ( 'app/styles/' + mainFile ) ;
237
238
} ;
238
239
239
240
Generator . prototype . appJs = function appJs ( ) {
@@ -253,14 +254,13 @@ Generator.prototype.createIndexHtml = function createIndexHtml() {
253
254
254
255
Generator . prototype . packageFiles = function ( ) {
255
256
this . coffee = this . env . options . coffee ;
256
- this . template ( '../../templates/common /_bower.json' , 'bower.json' ) ;
257
- this . template ( '../../templates/common /_package.json' , 'package.json' ) ;
258
- this . template ( '../../templates/common/Gruntfile .js' , 'Gruntfile.js' ) ;
257
+ this . template ( 'root /_bower.json' , 'bower.json' ) ;
258
+ this . template ( 'root /_package.json' , 'package.json' ) ;
259
+ this . template ( 'root/_Gruntfile .js' , 'Gruntfile.js' ) ;
259
260
} ;
260
261
261
262
Generator . prototype . imageFiles = function ( ) {
262
- this . sourceRoot ( path . join ( __dirname , 'templates' ) ) ;
263
- this . directory ( 'images' , 'app/images' , true ) ;
263
+ this . directory ( 'app/images' ) ;
264
264
} ;
265
265
266
266
Generator . prototype . _injectDependencies = function _injectDependencies ( ) {
0 commit comments