-
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
e206c19
commit 646931a
Showing
9 changed files
with
12,497 additions
and
3,310 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
File renamed without changes.
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,58 @@ | ||
const gulp = require("gulp"); | ||
const compiler = require("webpack"); | ||
const webpack = require("webpack-stream"); | ||
const named = require("vinyl-named"); | ||
const postcss = require("gulp-postcss"); | ||
|
||
/* ----------------------------------------- */ | ||
/* Compile CSS | ||
/* ----------------------------------------- */ | ||
|
||
const SYSTEM_SCSS = ["styles/**/*.css"]; | ||
/** | ||
* Compile CSS | ||
* @returns {object} | ||
*/ | ||
function compileCss() { | ||
return gulp.src("styles/theme-glass.css").pipe(postcss()).pipe(gulp.dest("./build")); | ||
} | ||
const css = gulp.series(compileCss); | ||
|
||
/* ----------------------------------------- */ | ||
/* Compile Javascript | ||
/* ----------------------------------------- */ | ||
|
||
const SYSTEM_JS = ["modules/**/*.js"]; | ||
/** | ||
* Compile JS | ||
* @returns {object} | ||
*/ | ||
function compileJs() { | ||
return gulp | ||
.src(["modules/theme-glass.js"]) | ||
.pipe(named()) | ||
.pipe(webpack({ mode: "production" }, compiler)) | ||
.pipe(gulp.dest("./build")); | ||
} | ||
const js = gulp.series(compileJs); | ||
|
||
/* ----------------------------------------- */ | ||
/* Watch Updates | ||
/* ----------------------------------------- */ | ||
|
||
/** | ||
* Watch modifications | ||
*/ | ||
function watchUpdates() { | ||
gulp.watch(SYSTEM_SCSS, css); | ||
gulp.watch(SYSTEM_JS, js); | ||
} | ||
|
||
/* ----------------------------------------- */ | ||
/* Export Tasks | ||
/* ----------------------------------------- */ | ||
|
||
exports.default = gulp.series(compileCss, compileJs, watchUpdates); | ||
exports.build = gulp.series(compileCss, compileJs); | ||
exports.css = css; | ||
exports.js = js; |
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
File renamed without changes.
Oops, something went wrong.