Skip to content

Commit 82f99fc

Browse files
committed
edit browserlist for demo page
1 parent 29af6bb commit 82f99fc

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

gulpfile.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ function css() {
3131
// if NODE_ENV === production, no sourcemaps and minify the css
3232
const path = `${sourcePath}/stylesheets/_main.css`;
3333

34+
// autoprefix more browsers for demo page
35+
var browsers = ["safari 13"];
36+
if (process.env.NODE_ENV === "demo") {
37+
console.log("its a demo");
38+
browsers = ["last 4 version"];
39+
}
40+
3441
if (
3542
process.env.NODE_ENV != "production"
3643
|| process.env.NODE_ENV != "demo"
@@ -39,15 +46,15 @@ function css() {
3946
.pipe(sourcemaps.init())
4047
.pipe(postcss([
4148
atImport(),
42-
autoprefixer({overrideBrowserslist: ["safari 13"]})
49+
autoprefixer({overrideBrowserslist: browsers})
4350
]))
4451
.pipe(sourcemaps.write())
4552
.pipe(dest(outputPath));
4653
} else {
4754
return src(path)
4855
.pipe(postcss([
4956
atImport(),
50-
autoprefixer({overrideBrowserslist: ["defaults"]})
57+
autoprefixer({overrideBrowserslist: browsers})
5158
]))
5259
.pipe(dest(outputPath));
5360
}

0 commit comments

Comments
 (0)