-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (42 loc) · 1.04 KB
/
gulpfile.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
41
42
43
44
45
const gulp = require("gulp");
var spsave = require('gulp-spsave');
const prompt = require("gulp-prompt");
const argv = require("minimist")(process.argv.slice(2));
const { URL } = require("./webpack/webpack.env");
const environment = argv.env || "test";
var coreOptions = {
siteUrl: URL[environment].siteUrl,
notification: true,
flatten: false
};
gulp.task("default", () => {
gulp.src("webpack/dist/**").pipe(
prompt.prompt(
[
{
type: "input",
name: "userid",
message: "Enter User ID - "
},
{
type: "password",
name: "pwd",
message: "Enter Password - "
}
],
function(res) {
// const proxy_URL =
// "";
// process.env.https_proxy = proxy_URL;
// process.env.http_proxy = proxy_URL;
gulp
.src("webpack/dist/**")
.pipe(spsave(coreOptions, {
username: res.userid,
password: res.pwd,
}))
.pipe(gulp.dest("build"));
}
)
);
});