forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.ts
55 lines (47 loc) · 1.79 KB
/
build.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { BuildOptions } from '../models/webpack-config';
const Command = require('../ember-cli/lib/models/command');
// defaults for BuildOptions
export const BaseBuildCommandOptions: any = [
{
name: 'target',
type: String,
default: 'development',
aliases: ['t', { 'dev': 'development' }, { 'prod': 'production' }]
},
{ name: 'environment', type: String, aliases: ['e'] },
{ name: 'output-path', type: 'Path', aliases: ['op'] },
{ name: 'aot', type: Boolean },
{ name: 'sourcemap', type: Boolean, aliases: ['sm'] },
{ name: 'vendor-chunk', type: Boolean, default: true, aliases: ['vc'] },
{ name: 'base-href', type: String, default: '/', aliases: ['bh'] },
{ name: 'deploy-url', type: String, aliases: ['d'] },
{ name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
{ name: 'progress', type: Boolean, default: true, aliases: ['pr'] },
{ name: 'i18n-file', type: String },
{ name: 'i18n-format', type: String },
{ name: 'locale', type: String },
{ name: 'extract-css', type: Boolean, aliases: ['ec']},
{
name: 'output-hashing',
type: String,
values: ['none', 'all', 'media', 'bundles'],
description: 'define the output filename cache-busting hashing mode',
aliases: ['oh']
},
];
export interface BuildTaskOptions extends BuildOptions {
watch?: boolean;
}
const BuildCommand = Command.extend({
name: 'build',
description: 'Builds your app and places it into the output path (dist/ by default).',
aliases: ['b'],
availableOptions: BaseBuildCommandOptions.concat([
{ name: 'watch', type: Boolean, default: false, aliases: ['w'] }
]),
run: function (commandOptions: BuildTaskOptions) {
return require('./build.run').default.call(this, commandOptions);
}
});
BuildCommand.overrideCore = true;
export default BuildCommand;