Skip to content

Instantly share code, notes, and snippets.

@MolchanovEduard
Created May 1, 2017 20:41
Show Gist options
  • Save MolchanovEduard/bf3a91649d5bdff941f30825b02e6c1c to your computer and use it in GitHub Desktop.
Save MolchanovEduard/bf3a91649d5bdff941f30825b02e6c1c to your computer and use it in GitHub Desktop.
browser-sync gulp uncss php
var g = require("gulp"),
p = require("gulp-load-plugins")(),
b = require("browser-sync").create(),
u = {
scss: "app/scss/main.scss",
css: "./app/css",
map_css: "../css",
app: "app/**/*.*",
proxy: "basic-project-template"
};
g.task("s", function() {
b.init({
// для php файлов
proxy: u.proxy,
/*
// для html файлов
server: { baseDir: "./app" },
*/
notify: false
});
});
/*
...
.pipe(g.dest(u.css))
.pipe(b.stream());
*/
g.task("watch", ["s"], function() {
g.watch(u.scss, ["css"]);
g.watch(u.app).on("change", b.reload);
});
g.task("default", ["watch"]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment