mirror of
https://github.com/vacp2p/vac.dev-experimental-old.git
synced 2025-02-27 04:20:34 +00:00
Correct build order
The css and jekyll-build tasks were in the wrong order, so Purgecss would always be one build behind.
This commit is contained in:
parent
9b4d5952bd
commit
a089ca7a99
19
gulpfile.js
19
gulpfile.js
@ -14,7 +14,7 @@ const jekyll = process.platform === "win32" ? "jekyll.bat" : "jekyll";
|
||||
/**
|
||||
* Build Jekyll Site
|
||||
*/
|
||||
gulp.task("jekyll-build", ["css"], function() {
|
||||
gulp.task("jekyll-build", function() {
|
||||
browserSync.notify("Building Jekyll site...");
|
||||
return child.spawn(jekyll, ["build"], { stdio: "inherit" });
|
||||
});
|
||||
@ -32,7 +32,7 @@ class TailwindExtractor {
|
||||
/**
|
||||
* Compile CSS
|
||||
*/
|
||||
gulp.task("css", function() {
|
||||
gulp.task("css", ["jekyll-build"], function() {
|
||||
const atimport = require("postcss-import");
|
||||
const postcss = require("gulp-postcss");
|
||||
const tailwindcss = require("tailwindcss");
|
||||
@ -70,7 +70,7 @@ gulp.task("css", function() {
|
||||
/**
|
||||
* Serve site with Browsersync
|
||||
*/
|
||||
gulp.task("serve", ["jekyll-build"], () => {
|
||||
gulp.task("serve", ["css"], () => {
|
||||
browserSync.init({
|
||||
files: [siteRoot + "/**"],
|
||||
open: "local",
|
||||
@ -80,11 +80,18 @@ gulp.task("serve", ["jekyll-build"], () => {
|
||||
}
|
||||
});
|
||||
|
||||
gulp.watch([mainCSS, tailwindConfig], ["css"]);
|
||||
gulp.watch(
|
||||
["**/*.html", "**/*.md", "**/*.yml", "!_site/**/*, !node_modules"],
|
||||
[
|
||||
mainCSS,
|
||||
tailwindConfig,
|
||||
"**/*.html",
|
||||
"**/*.md",
|
||||
"**/*.yml",
|
||||
"!_site/**/*",
|
||||
"!node_modules"
|
||||
],
|
||||
{ interval: 500 },
|
||||
["jekyll-build"]
|
||||
["css"]
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user