forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput-dir.ts
More file actions
21 lines (19 loc) · 889 Bytes
/
output-dir.ts
File metadata and controls
21 lines (19 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {ng} from '../../utils/process';
import {expectFileToExist} from '../../utils/fs';
import {expectToFail} from '../../utils/utils';
import {expectGitToBeClean} from '../../utils/git';
import {updateJsonFile} from '../../utils/project';
export default function() {
return ng('build', '-op', './build-output')
.then(() => expectFileToExist('./build-output/index.html'))
.then(() => expectFileToExist('./build-output/main.bundle.js'))
.then(() => expectToFail(expectGitToBeClean))
.then(() => updateJsonFile('angular-cli.json', configJson => {
const app = configJson['apps'][0];
app['outDir'] = 'config-build-output';
}))
.then(() => ng('build'))
.then(() => expectFileToExist('./config-build-output/index.html'))
.then(() => expectFileToExist('./config-build-output/main.bundle.js'))
.then(() => expectToFail(expectGitToBeClean));
}