-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
29 lines (25 loc) · 950 Bytes
/
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
let gulp = require("gulp");
// Requires the gulp-sass plugin
const sass = require("gulp-sass");
// Requires the gulp-concat plugin
const concat = require("gulp-concat");
// Hit 'compile-sass' in the terminal to compile all sass files to css
const cssDest = "src/css", sassFiles = "src/scss/**/*.scss";
gulp.task("compile-sass", function() {
return gulp.src(sassFiles) // Getting all scss files in scss folder
.pipe(sass()) // Using gulp-sass
.pipe(gulp.dest(cssDest)) // Getting all css files in css folder
});
// Concats js files in order.
gulp.task("concat", function() {
return gulp.src([
"src/js/variables.js",
"src/js/fontEditor.js",
"src/js/paragraphEditor.js",
"src/js/stylesEditor.js",
"src/js/printButton.js",
"src/js/letter-counter.js"
])
.pipe(concat("index.js"))
.pipe(gulp.dest("src/js"))
});