0.0.3 • Published 6 years ago

gulp-sequence-cmd-commend v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

gulp-sequence-cmd-commend

This is a sequential cmd commend runner which runs multiple commends one after one

example

const { CommendRunner } = require('./dest');
const gulp = require('gulp');
const ts = require('gulp-typescript');

const tsProject = ts.createProject('./tsconfig.json');


const TASK = new CommendRunner([
    // First commend
    {
        cmd: 'npm run build:server' 
        , onDone () {
            console.log('1st');
        }
    }
    
    // Second commend
    , {
        cmd: 'npm run build:client'
        , onDone () {
            console.log('2nd');
        }
    }
    
    // 3rd commend
    , {
        cmd: 'npm run start'
        , onDone () {
            console.log('3rd');
        }
    }
]);

// Restart server on file change 
gulp.task('start:watch', () => {
    
    let watcher = gulp.watch('./src/**/*.ts');
    watcher.on('change', () => TASK.runWithInterval(1500));
    TASK.run()
});
0.0.3

6 years ago

0.0.2-c

6 years ago

0.0.2-b

6 years ago

0.0.2-a

6 years ago

0.0.1-d

6 years ago

0.0.2

6 years ago

0.0.1-c

6 years ago

0.0.1-b

6 years ago

0.0.1-a

6 years ago

0.0.1

6 years ago