File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ angular . module ( '<%= preffix %>.<%= moduleName %>' )
4+ . value ( '<%= name %>' , {
5+ meaningOfLife : 42
6+ } ) ;
7+
8+
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var util = require ( 'util' ) ;
4+ var path = require ( 'path' ) ;
5+ var yeoman = require ( 'yeoman-generator' ) ;
6+ var ScriptBase = require ( '../script-base.js' ) ;
7+
8+ var ValueGenerator = module . exports = function ( args , options ) {
9+ ScriptBase . apply ( this , arguments ) ;
10+
11+ this . moduleName = args [ 0 ] ;
12+ this . name = args [ 1 ] ;
13+ } ;
14+
15+ util . inherits ( ValueGenerator , ScriptBase ) ;
16+
17+ ValueGenerator . prototype . createSourceFile = function ( ) {
18+ this . sourceRoot ( path . join ( __dirname , '../templates' ) ) ;
19+ yeoman . generators . Base . prototype . template . apply ( this , [
20+ 'value.js' ,
21+ 'app/' + this . moduleName + '/' + this . name + 'Value.js'
22+ ] ) ;
23+ } ;
24+
You can’t perform that action at this time.
0 commit comments