Move tasks to separate files and simplify
This commit is contained in:
parent
dde26ec45e
commit
06ba111392
12 changed files with 1560 additions and 1030 deletions
25
gulp/tasks/sync.js
Normal file
25
gulp/tasks/sync.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
const config = require('../config');
|
||||
const browserSync = require('browser-sync'), server = browserSync.create();
|
||||
|
||||
// Automagically reload browsers
|
||||
function reload(done) {
|
||||
server.reload();
|
||||
|
||||
done();
|
||||
}
|
||||
|
||||
// Serve files to the browser
|
||||
function serve(done) {
|
||||
server.init({
|
||||
index: config.index,
|
||||
open: false,
|
||||
server: config.dev
|
||||
});
|
||||
|
||||
done();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
serve: serve,
|
||||
reload: reload,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue