Skip to content

Commit

Permalink
fix(gen): canary cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Awk34 committed Mar 4, 2018
1 parent b81639f commit 96364a7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
15 changes: 12 additions & 3 deletions src/generators/app/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {exec} from 'child_process';
import path from 'path';
import Promise from 'bluebird';
import { runCmd } from '../util';
Expand Down Expand Up @@ -547,9 +548,17 @@ export class Generator extends Base {

function pugReplacer(contents) {
return contents
.replace('ngif', 'ngIf')
.replace('ngfor', 'ngFor')
.replace('ngmodel', 'ngModel');
.replace(/confirmpassword/g, 'confirmPassword')
.replace(/loginform/g, 'loginForm')
.replace(/newpassword/g, 'newPassword')
.replace(/ngif/g, 'ngIf')
.replace(/ngfor/g, 'ngFor')
.replace(/ngmodel/g, 'ngModel')
.replace(/ngsubmit/g, 'ngSubmit')
.replace(/oldpassword/g, 'oldPassword')
.replace(/routerlinkactive/g, 'routerLinkActive')
.replace(/routerlink/g, 'routerLink')
.replace(/signupform/g, 'signupForm');
}

this.registerTransformStream([
Expand Down
3 changes: 1 addition & 2 deletions templates/app/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ejs": "^2.5.3",<% } %><% if(filters.mongoose) { %>
"mongoose": "^4.1.2",
"bluebird": "^3.3.3",
"connect-mongo": "^1.2.1",<% } %><% if(filters.sequelize) { %>
"connect-mongo": "^2.0.1",<% } %><% if(filters.sequelize) { %>
"sequelize": "^3.23.6",
"sqlite3": "~3.1.1",
"connect-session-sequelize": "^4.1.0",<% } %><% if(filters.auth) { %>
Expand Down Expand Up @@ -80,7 +80,6 @@
"@types/selenium-webdriver": "^3.0.3",
"@types/webpack": "^3.0.10",
<%_ } -%>
"angular2-universal": "2.1.0-rc.1",
"angular2-jwt": "^0.2.3",
<% if(filters.auth) { %>
"angular-validation-match": "^1.9.0",<% } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { StateService } from 'ui-router-ng2';<% } %>
<%_ if(filters.ngroute) { -%>
import { Router } from '@angular/router';<% } %>
import { AuthService } from '../../../components/auth/auth.service';
import template from './signup.html';

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

@Component({
selector: 'signup',
template,
template: require('./signup.<%=templateExt%>'),
})
export class SignupComponent {
user: User = {
Expand Down
3 changes: 1 addition & 2 deletions templates/app/client/components/navbar/navbar.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import { StateService } from 'ui-router-ng2';<% } %>
<%_ if (filters.ngroute) { -%>
import { Router } from '@angular/router';<% } %>
import { AuthService } from '../auth/auth.service';<% } %>
import template from './navbar.html';

@Component({
selector: 'navbar',
template,
template: require('./navbar.<%=templateExt%>'),
})
export class NavbarComponent {
isCollapsed = true;
Expand Down
1 change: 1 addition & 0 deletions templates/app/tsconfig(ts).json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"moduleResolution": "node",
"lib": [
"es2016",
"es2017",
"dom"
]
},
Expand Down
4 changes: 2 additions & 2 deletions templates/app/webpack.make.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ module.exports = function makeWebpackConfig(options) {
modules: false,
}]
],
plugins: [
'transform-flow-comments',
plugins: [<% if(filters.flow) { %>
'transform-flow-comments',<% } %>
'angular2-annotations',
'transform-runtime',
'transform-decorators-legacy',
Expand Down

0 comments on commit 96364a7

Please sign in to comment.