File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -542,6 +542,14 @@ export class Generator extends Base {
542
542
// Convert HTML into Pug
543
543
if ( this . filters . pug ) {
544
544
let pugFilter = filter ( [ '**/*.html' , '!client/_index.html' ] , { restore : true } ) ;
545
+
546
+ function pugReplacer ( contents ) {
547
+ return contents
548
+ . replace ( 'ngif' , 'ngIf' )
549
+ . replace ( 'ngfor' , 'ngFor' )
550
+ . replace ( 'ngmodel' , 'ngModel' ) ;
551
+ }
552
+
545
553
this . registerTransformStream ( [
546
554
pugFilter ,
547
555
html2jade ( {
@@ -552,6 +560,11 @@ export class Generator extends Base {
552
560
rename ( path => {
553
561
path . extname = '.pug' ;
554
562
} ) ,
563
+ tap ( function ( file , t ) {
564
+ var contents = file . contents . toString ( ) ;
565
+ contents = pugReplacer ( contents ) ;
566
+ file . contents = new Buffer ( contents ) ;
567
+ } ) ,
555
568
pugFilter . restore
556
569
] ) ;
557
570
}
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ export function app(options) {
212
212
/* WebSockets */
213
213
if ( options . ws ) {
214
214
files = files . concat ( [
215
+ 'client/components/socket/primus.mock.' + script ,
215
216
'client/components/socket/socket.service.' + script ,
216
217
'client/components/socket/socket.mock.' + script ,
217
218
'server/api/thing/thing.socket.js' ,
Original file line number Diff line number Diff line change 7
7
"sourceMap" : true ,
8
8
"rootDir" : " ./" ,
9
9
"module" : " es6" ,
10
- "outDir" : " .tmp" ,<% if(filters.ws) %>
10
+ "outDir" : " .tmp" ,<% if(filters.ws) { %>
11
11
"paths" : {
12
12
"primus" : [" client/components/socket/primus.js" ]
13
13
},<% } %>
You can’t perform that action at this time.
0 commit comments