Skip to content

Commit 9dec0c0

Browse files
committed
fix templates
1 parent 7803be8 commit 9dec0c0

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

cli/core/template/src/components/app/controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export class AppController {
2929
this.finishedRendering = Date.now() - STARTUP_TIMESTAMP;
3030
RouterService.navigate('series');
3131
const APP_METADATE = {
32-
author: 'APP_AUTHOR',
33-
homepage: 'APP_HOMEPAGE',
34-
name: 'APP_NAME',
35-
version: 'APP_VERSION',
32+
author: '$$APP_AUTHOR$$',
33+
homepage: '$$APP_HOMEPAGE$$',
34+
name: '$$APP_NAME$$',
35+
version: '$$APP_VERSION$$',
3636
};
3737
console.log('APP_METADATE', APP_METADATE);
3838
}

cli/frameworks/angular/template/src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
77

88
import { AppModule } from './angular.module';
99

10-
if (process.env.NODE_ENV === 'production') {
10+
const ENVs = {
11+
NODE_ENV: '$$NODE_ENV$$',
12+
};
13+
if (ENVs.NODE_ENV === 'production') {
1114
enableProdMode();
1215
}
1316

cli/frameworks/preact/template/src/preact.main.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { DI } from '@leanup/lib/helpers/injector';
55
import { AppComponent } from './components/app/component.preact';
66

77
// https://github.com/preactjs/preact/blob/master/README.md#debug-mode
8-
if (process.env.NODE_ENV === 'development') {
8+
const ENVs = {
9+
NODE_ENV: '$$NODE_ENV$$',
10+
};
11+
if (ENVs.NODE_ENV === 'development') {
912
require('preact/debug');
1013
}
1114

cli/frameworks/vue/template/src/main.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import App from './components/app/component.vue';
77
import { APP_HTML_ELEMENT } from './shares/constant';
88

99
// https://github.com/vuejs/vue-devtools
10-
Vue.config.devtools = process.env.NODE_ENV === 'development';
10+
const ENVs = {
11+
NODE_ENV: '$$NODE_ENV$$',
12+
};
13+
Vue.config.devtools = ENVs.NODE_ENV === 'development';
1114

1215
DI.register('Framework', {
1316
name: 'Vue',
14-
version: Vue.version
17+
version: Vue.version,
1518
});
1619
require('./shares/register');
1720
require('./shares/routing');
@@ -25,6 +28,6 @@ if (htmlDivElement instanceof HTMLDivElement) {
2528
// tslint:disable-next-line: no-unused-expression
2629
new Vue({
2730
el: APP_HTML_ELEMENT,
28-
render: (h: any) => h(App)
31+
render: (h: any) => h(App),
2932
});
3033
}

0 commit comments

Comments
 (0)