mermaid/gulp/tasks/dev.js

27 lines
946 B
JavaScript
Raw Normal View History

/**
* Created by knut on 2015-12-26.
*/
2017-04-11 22:14:25 +08:00
var gulp = require('gulp')
var shell = require('gulp-shell')
var liveServer = require('live-server')
var params = {
2017-04-11 22:14:25 +08:00
port: 8080, // Set the server port. Defaults to 8080.
host: '0.0.0.0', // Set the address to bind to. Defaults to 0.0.0.0.
root: './test/examples', // Set root directory that's being server. Defaults to cwd.
open: true, // When false, it won't load your browser by default.
ignore: 'scss,my/templates', // comma-separated string for paths to ignore
2017-04-16 18:36:42 +08:00
// file: "index.html", // When set, serve this file for every 404 (useful for single-page applications)
2017-04-11 22:14:25 +08:00
wait: 1000, // Waits for all changes, before reloading. Defaults to 0 sec.
mount: [['/dist', './dist']] // Mount a directory to a route.
}
gulp.task('live-server', function () {
liveServer.start(params)
})
2017-04-11 22:14:25 +08:00
gulp.task('watch2', ['live-server'], function () {
return shell.task([
2017-04-17 00:37:01 +08:00
'yarn build -- --watch'
2017-04-11 22:14:25 +08:00
])
})