mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-06 00:56:42 +02:00
Auto fix standard style voilations
This commit is contained in:
@@ -1,61 +1,58 @@
|
||||
/**
|
||||
* Created by knut on 2015-12-26.
|
||||
*/
|
||||
var gulp = require('gulp');
|
||||
var shell = require('gulp-shell');
|
||||
var liveServer = require("live-server");
|
||||
var gulp = require('gulp')
|
||||
var shell = require('gulp-shell')
|
||||
var liveServer = require('live-server')
|
||||
|
||||
var params = {
|
||||
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
|
||||
//file: "index.html", // When set, serve this file for every 404 (useful for single-page applications)
|
||||
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);
|
||||
});
|
||||
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
|
||||
// file: "index.html", // When set, serve this file for every 404 (useful for single-page applications)
|
||||
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)
|
||||
})
|
||||
|
||||
|
||||
gulp.task('watch2',['live-server'],function(){
|
||||
return shell.task([
|
||||
gulp.task('watch2', ['live-server'], function () {
|
||||
return shell.task([
|
||||
'watchify src/mermaid.js -s mermaid -o dist/mermaid.js',
|
||||
'node node_modules/eslint-watch/bin/esw src -w'
|
||||
]);
|
||||
});
|
||||
|
||||
])
|
||||
})
|
||||
|
||||
// Basic usage
|
||||
gulp.task('watch-mermaid',function() {
|
||||
|
||||
return gulp.src('src/mermaid.js')
|
||||
gulp.task('watch-mermaid', function () {
|
||||
return gulp.src('src/mermaid.js')
|
||||
.pipe(browserify({
|
||||
entry:'src/mermaid.js',
|
||||
standalone: 'mermaid'
|
||||
entry: 'src/mermaid.js',
|
||||
standalone: 'mermaid'
|
||||
}))
|
||||
.pipe(rename('mermaid.js'))
|
||||
.pipe(gulp.dest('./dist/'))
|
||||
.pipe(uglify())
|
||||
.pipe(extReplace('.min.js'))
|
||||
.pipe(gulp.dest('./dist/'));
|
||||
});
|
||||
.pipe(gulp.dest('./dist/'))
|
||||
})
|
||||
|
||||
//var bg = require("gulp-bg");
|
||||
// var bg = require("gulp-bg");
|
||||
//
|
||||
//let bgtask;
|
||||
//gulp.task("server", bgtask = bg("node", "--harmony", "server.js"));
|
||||
// let bgtask;
|
||||
// gulp.task("server", bgtask = bg("node", "--harmony", "server.js"));
|
||||
//
|
||||
//const exitCallback = (proc) => { if (proc.errorcode != 0) { process.exit(proc.errorcode); } };
|
||||
// const exitCallback = (proc) => { if (proc.errorcode != 0) { process.exit(proc.errorcode); } };
|
||||
//
|
||||
//gulp.task("stop", () => {
|
||||
// gulp.task("stop", () => {
|
||||
// bgtask.setCallback(exitCallback);
|
||||
//bgtask.stop();
|
||||
//}
|
||||
//});
|
||||
// bgtask.stop();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
//gulp.task("default", ["server"], function() {
|
||||
// gulp.task("default", ["server"], function() {
|
||||
// gulp.watch(["server.js"], ["server"]);
|
||||
//});
|
||||
// });
|
||||
|
Reference in New Issue
Block a user