Skip to content

Commit 3491d1c

Browse files
Merge pull request #7 from multividas/FIXING
fixing-gulpjs
2 parents 0604014 + 23df9d6 commit 3491d1c

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

gulpfile.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,22 @@ const compileSass = async () => {
3535
}
3636
}
3737

38-
const buildComponentStyles = () => {
39-
const cssFiles = [
40-
{ src: './docs/header.css', rename: '[email protected]' },
41-
{ src: './docs/footer.css', rename: '[email protected]' },
42-
{ src: './docs/main.css', rename: '[email protected]' }
43-
]
44-
45-
return cssFiles.map(file =>
46-
gulp.src(file.src)
47-
.pipe(cleanCSS({ compatibility: 'ie8' }))
48-
.pipe(rename(file.rename))
49-
.pipe(header(headerComment))
50-
.pipe(gulp.dest('./docs/'))
51-
)
52-
}
38+
const buildComponentStyles = gulp.parallel(
39+
() => gulp.src('./docs/header.css')
40+
.pipe(cleanCSS({ compatibility: 'ie8' }))
41+
.pipe(rename('[email protected]'))
42+
.pipe(header(headerComment))
43+
.pipe(gulp.dest('./docs/')),
44+
() => gulp.src('./docs/footer.css')
45+
.pipe(cleanCSS({ compatibility: 'ie8' }))
46+
.pipe(rename('[email protected]'))
47+
.pipe(header(headerComment))
48+
.pipe(gulp.dest('./docs/')),
49+
() => gulp.src('./docs/main.css')
50+
.pipe(cleanCSS({ compatibility: 'ie8' }))
51+
.pipe(rename('[email protected]'))
52+
.pipe(header(headerComment))
53+
.pipe(gulp.dest('./docs/'))
54+
)
5355

5456
exports.build = gulp.series(compileSass, buildComponentStyles)

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616
],
1717
"scripts": {
18-
"watch": "gulp watch",
1918
"build": "gulp build"
2019
},
2120
"devDependencies": {

0 commit comments

Comments
 (0)