Skip to content

Commit fea17cf

Browse files
fix: add error output to ngc task
1 parent 31df1e3 commit fea17cf

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

docs/favicons.md

Whitespace-only changes.

src/commands/serve.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function serve(isProdBuild = false) {
6060
.subscribe(config => {
6161
const cache = !isProdBuild
6262
const isAotBuild = isProdBuild
63+
const isLocalDev = !isProdBuild
6364
const log = config.fusebox.verbose || false
6465
const homeDir = resolve('.')
6566
const serverOutput = resolve(config.fusebox.server.outputDir)
@@ -85,15 +86,14 @@ function serve(isProdBuild = false) {
8586
Ng2TemplatePlugin(),
8687
['*.component.html', RawPlugin()],
8788
WebIndexPlugin({
88-
title: 'test',
8989
bundles: ['app', 'vendor'],
9090
path: 'js',
9191
target: '../index.html',
9292
template: resolve('src/app/index.pug'),
9393
engine: 'pug',
9494
locals: {
9595
pageTitle: 'FUSING ANGULAR',
96-
isLocalDev: !isProdBuild
96+
isLocalDev
9797
}
9898
}),
9999
NgProdPlugin({ enabled: isProdBuild }),

src/fusebox/ng.compiler.plugin.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ export class NgcPluginClass implements Plugin {
1717
constructor(private opts: NgcPluginOptions = defaults) {}
1818

1919
bundleStart() {
20-
this.opts.enabled && ngc(['-p', resolve('tsconfig.aot.json')])
20+
this.opts.enabled &&
21+
ngc(['-p', resolve('tsconfig.aot.json')], err => {
22+
console.error(err)
23+
process.exit(1)
24+
})
2125
}
2226
}
2327

src/templates/core/server/server.app.ts.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const expressApp = express()
2323
const dir = resolve(base, '.dist')
2424
const publicDir = `${dir}/public`
2525

26-
isLocalDevelopmentServer && require('reload')(expressApp)
26+
require('reload')(expressApp)
2727

2828
expressApp.use(cookieParser())
2929

src/utilities/environment-variables.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { config as readDotEnv } from 'dotenv'
22

33
export interface AppEnvironmentSettings {
4-
readonly PORT: number
4+
readonly PORT: string
5+
readonly ENV: string
56
}
67

78
interface StringDictionary {

0 commit comments

Comments
 (0)