Skip to content

Commit 88d90db

Browse files
committed
fix(gen): remedy test failure
1 parent 689d0b2 commit 88d90db

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

Diff for: src/generators/app/index.js

+13
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,14 @@ export class Generator extends Base {
542542
// Convert HTML into Pug
543543
if(this.filters.pug) {
544544
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+
545553
this.registerTransformStream([
546554
pugFilter,
547555
html2jade({
@@ -552,6 +560,11 @@ export class Generator extends Base {
552560
rename(path => {
553561
path.extname = '.pug';
554562
}),
563+
tap(function(file, t) {
564+
var contents = file.contents.toString();
565+
contents = pugReplacer(contents);
566+
file.contents = new Buffer(contents);
567+
}),
555568
pugFilter.restore
556569
]);
557570
}

Diff for: src/test/get-expected-files.js

+1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ export function app(options) {
212212
/* WebSockets */
213213
if (options.ws) {
214214
files = files.concat([
215+
'client/components/socket/primus.mock.' + script,
215216
'client/components/socket/socket.service.' + script,
216217
'client/components/socket/socket.mock.' + script,
217218
'server/api/thing/thing.socket.js',

Diff for: templates/app/tsconfig(ts).json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"sourceMap": true,
88
"rootDir": "./",
99
"module": "es6",
10-
"outDir": ".tmp",<% if(filters.ws) %>
10+
"outDir": ".tmp",<% if(filters.ws) { %>
1111
"paths": {
1212
"primus": ["client/components/socket/primus.js"]
1313
},<% } %>

0 commit comments

Comments
 (0)