forked from microsoft/azure-pipelines-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copyStaticFiles.js
34 lines (33 loc) · 952 Bytes
/
copyStaticFiles.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
"use strict";
var path = require('path');
var shell = require('shelljs');
//------------------------------------------------------------------------------
// shell functions
//------------------------------------------------------------------------------
var shellAssert = function () {
var errMsg = shell.error();
if (errMsg) {
throw new Error(errMsg);
}
};
var cp = function (options, source, dest) {
if (dest) {
shell.cp(options, source, dest);
}
else {
shell.cp(options, source);
}
shellAssert();
};
var mkdir = function (options, target) {
if (target) {
shell.mkdir(options, target);
}
else {
shell.mkdir(options);
}
shellAssert();
};
mkdir("-p", path.join(__dirname, 'dist/configure/templates'));
cp("-Rf", path.join(__dirname, 'src/configure/templates/*'), path.join(__dirname, 'dist/configure/templates'));
//# sourceMappingURL=copyStaticFiles.js.map