-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86f131d
commit 5435f37
Showing
6 changed files
with
6,186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": [ "@babel/preset-env" ] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// General | ||
import gulp from 'gulp'; | ||
import del from 'del'; | ||
import rename from 'gulp-rename'; | ||
import sourcemaps from 'gulp-sourcemaps' | ||
|
||
// CSS | ||
import sass from 'gulp-sass'; | ||
import autoprefixer from 'gulp-autoprefixer'; | ||
|
||
// Paths | ||
const paths = { | ||
src: './src/**/*', | ||
dest: './dist/**/*', | ||
|
||
styles: { | ||
src: './src/scss/*.scss', | ||
dest: './dist/' | ||
} | ||
}; | ||
|
||
export const clean = () => del(paths.dest); | ||
|
||
export function styles() { | ||
console.log('styles()'); | ||
return gulp.src(paths.styles.src) | ||
.pipe(sourcemaps.init()) | ||
.pipe(autoprefixer()) | ||
.pipe(sass({ | ||
outputStyle: 'compressed' | ||
})) | ||
.pipe(sourcemaps.write()) | ||
.pipe(rename('style.min.css')) | ||
.pipe(gulp.dest(paths.styles.dest)); | ||
} | ||
|
||
function watchFiles() { | ||
gulp.watch(paths.styles.src, styles); | ||
} | ||
|
||
const build = gulp.series(clean, styles); | ||
|
||
export { watchFiles as watch }; | ||
export default build; |
Oops, something went wrong.