forked from blackbaud/skyux-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
40 lines (38 loc) · 1.14 KB
/
index.js
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
/*jshint node: true*/
'use strict';
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const logger = require('./utils/logger');
const config = require('./config/sky-pages/sky-pages.config');
module.exports = {
runCommand: (command, argv) => {
const skyPagesConfig = config.getSkyPagesConfig(command);
switch (command) {
case 'build':
require('./cli/build')(argv, skyPagesConfig, webpack);
break;
case 'build-public-library':
require('./cli/build-public-library')(skyPagesConfig, webpack);
break;
case 'e2e':
require('./cli/e2e')(argv, skyPagesConfig, webpack);
break;
case 'serve':
require('./cli/serve')(argv, skyPagesConfig, webpack, WebpackDevServer);
break;
case 'lint':
require('./cli/lint')();
break;
case 'test':
case 'watch':
require('./cli/test')(command, argv);
break;
case 'version':
require('./cli/version')();
break;
default:
logger.info('@blackbaud/skyux-builder: Unknown command %s', command);
break;
}
}
};