forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.js
More file actions
28 lines (24 loc) · 712 Bytes
/
build.js
File metadata and controls
28 lines (24 loc) · 712 Bytes
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
import 'colors';
import bower from './amd/build';
import lib from './lib/build';
import es from './es/build';
import dist from './dist/build';
import { copy } from './fs-utils';
import { distRoot, bowerRoot } from './constants';
import { exec } from './exec';
function forkAndBuildDocs({verbose}) {
console.log('Building: '.cyan + 'docs'.green);
const verboseOption = verbose ? '--verbose' : '';
return exec(`npm run docs-build -- ${verboseOption}`)
.then(() => console.log('Built: '.cyan + 'docs'.green));
}
export default function Build(options) {
return Promise.all([
lib(),
es(),
bower(),
dist(),
forkAndBuildDocs(options)
])
.then(() => copy(distRoot, bowerRoot));
}