Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 96364a7

Browse filesBrowse files
committed
fix(gen): canary cleanup
1 parent b81639f commit 96364a7
Copy full SHA for 96364a7

File tree

6 files changed

+18
-11
lines changed
Filter options

6 files changed

+18
-11
lines changed

‎src/generators/app/index.js

Copy file name to clipboardExpand all lines: src/generators/app/index.js
+12-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {exec} from 'child_process';
12
import path from 'path';
23
import Promise from 'bluebird';
34
import { runCmd } from '../util';
@@ -547,9 +548,17 @@ export class Generator extends Base {
547548

548549
function pugReplacer(contents) {
549550
return contents
550-
.replace('ngif', 'ngIf')
551-
.replace('ngfor', 'ngFor')
552-
.replace('ngmodel', 'ngModel');
551+
.replace(/confirmpassword/g, 'confirmPassword')
552+
.replace(/loginform/g, 'loginForm')
553+
.replace(/newpassword/g, 'newPassword')
554+
.replace(/ngif/g, 'ngIf')
555+
.replace(/ngfor/g, 'ngFor')
556+
.replace(/ngmodel/g, 'ngModel')
557+
.replace(/ngsubmit/g, 'ngSubmit')
558+
.replace(/oldpassword/g, 'oldPassword')
559+
.replace(/routerlinkactive/g, 'routerLinkActive')
560+
.replace(/routerlink/g, 'routerLink')
561+
.replace(/signupform/g, 'signupForm');
553562
}
554563

555564
this.registerTransformStream([

‎templates/app/_package.json

Copy file name to clipboardExpand all lines: templates/app/_package.json
+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"ejs": "^2.5.3",<% } %><% if(filters.mongoose) { %>
3333
"mongoose": "^4.1.2",
3434
"bluebird": "^3.3.3",
35-
"connect-mongo": "^1.2.1",<% } %><% if(filters.sequelize) { %>
35+
"connect-mongo": "^2.0.1",<% } %><% if(filters.sequelize) { %>
3636
"sequelize": "^3.23.6",
3737
"sqlite3": "~3.1.1",
3838
"connect-session-sequelize": "^4.1.0",<% } %><% if(filters.auth) { %>
@@ -80,7 +80,6 @@
8080
"@types/selenium-webdriver": "^3.0.3",
8181
"@types/webpack": "^3.0.10",
8282
<%_ } -%>
83-
"angular2-universal": "2.1.0-rc.1",
8483
"angular2-jwt": "^0.2.3",
8584
<% if(filters.auth) { %>
8685
"angular-validation-match": "^1.9.0",<% } %>

‎templates/app/client/app/account(auth)/signup/signup.component.js

Copy file name to clipboardExpand all lines: templates/app/client/app/account(auth)/signup/signup.component.js
+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { StateService } from 'ui-router-ng2';<% } %>
55
<%_ if(filters.ngroute) { -%>
66
import { Router } from '@angular/router';<% } %>
77
import { AuthService } from '../../../components/auth/auth.service';
8-
import template from './signup.html';
98

109
<%_ if(filters.flow) { -%>
1110
type User = {
@@ -21,7 +20,7 @@ interface User {
2120

2221
@Component({
2322
selector: 'signup',
24-
template,
23+
template: require('./signup.<%=templateExt%>'),
2524
})
2625
export class SignupComponent {
2726
user: User = {

‎templates/app/client/components/navbar/navbar.component.js

Copy file name to clipboardExpand all lines: templates/app/client/components/navbar/navbar.component.js
+1-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import { StateService } from 'ui-router-ng2';<% } %>
55
<%_ if (filters.ngroute) { -%>
66
import { Router } from '@angular/router';<% } %>
77
import { AuthService } from '../auth/auth.service';<% } %>
8-
import template from './navbar.html';
98

109
@Component({
1110
selector: 'navbar',
12-
template,
11+
template: require('./navbar.<%=templateExt%>'),
1312
})
1413
export class NavbarComponent {
1514
isCollapsed = true;

‎templates/app/tsconfig(ts).json

Copy file name to clipboardExpand all lines: templates/app/tsconfig(ts).json
+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"moduleResolution": "node",
1818
"lib": [
1919
"es2016",
20+
"es2017",
2021
"dom"
2122
]
2223
},

‎templates/app/webpack.make.js

Copy file name to clipboardExpand all lines: templates/app/webpack.make.js
+2-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ module.exports = function makeWebpackConfig(options) {
131131
modules: false,
132132
}]
133133
],
134-
plugins: [
135-
'transform-flow-comments',
134+
plugins: [<% if(filters.flow) { %>
135+
'transform-flow-comments',<% } %>
136136
'angular2-annotations',
137137
'transform-runtime',
138138
'transform-decorators-legacy',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.