forked from boldreports/aspnet-mvc-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
20 lines (19 loc) · 788 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var gulp = require("gulp");
const download = require("gulp-download");
const { createReadStream } = require('fs');
const { rm, mkdir } = require('shelljs');
const unzipper = require('unzipper');
const puppeteerPath = 'Scripts/puppeteer/Win-901912';
gulp.task('puppeteer-download', (done) => {
mkdir('-p', `${puppeteerPath}`);
download('https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/901912/chrome-win.zip')
.pipe(gulp.dest(`${puppeteerPath}`))
.on('end', () => {
createReadStream(`${puppeteerPath}/chrome-win.zip`)
.pipe(unzipper.Extract({ path: `${puppeteerPath}` }))
.on('close', () => {
rm('-rf', [`${puppeteerPath}/chrome-win.zip`]);
done();
});
})
});