UNPKG

simplr-gulp

Version:

Fully functional gulpfile.js implementation. Tailored for Single Page Application. Written in TypeScript.

32 lines (31 loc) 1.13 kB
Object.defineProperty(exports, "__esModule", { value: true }); const task_base_1 = require("../task-base"); const watcher_tasks_handler_1 = require("../../watchers/watcher-tasks-handler"); const server_1 = require("../../server"); const gulp = require("gulp"); class DefaultTask extends task_base_1.TaskBase { constructor() { super(...arguments); this.Name = "default"; this.Description = "Build and start Watch with Server tasks."; this.TaskFunction = (production, done) => { if (this.startWithoutBuild) { this.startWatcherWithServer(done); } else { gulp.parallel("Build")(() => { this.startWatcherWithServer(done); }); } }; } startWatcherWithServer(done) { new watcher_tasks_handler_1.WatcherTasksHandler(); new server_1.Server(); done(); } get startWithoutBuild() { return (process.argv.findIndex(x => x.toLowerCase() === "--nobuild") !== -1); } } exports.DefaultTask = DefaultTask;