Coder Social home page Coder Social logo

gulp-tosync's Introduction

gulp-tosync

A simple gulp plugin which is using to run the tasks of gulp.task method in sync way

Install

$ npm install gulp-tosync --save

Usage

Import the plugin after installed:

var gulptosync = require("gulp-tosync")

demo_1:

gulp.task("default", gulptosync(["build-css", "build-js", "build-img"], "build-html"));

results:

E:\GitHub\myblog>gulp
[17:44:55] Using gulpfile E:\GitHub\myblog\gulpfile.js
[17:44:55] Starting 'default'...
[17:44:55] Starting 'build-css'...
[17:44:55] Starting 'build-img'...
[17:44:55] Starting 'build-js'...
[17:44:55] Finished 'build-img' after 23 ms
[17:44:56] Finished 'build-css' after 615 ms
[17:44:56] Finished 'build-js' after 703 ms
[17:44:56] Starting 'build-html'...
[17:44:56] Finished 'build-html' after 48 ms
[17:44:56] Finished 'default' after 850 ms

demo_2:

gulp.task("test", gulptosync(["build-js", "build-img"]));
gulp.task("default", gulptosync(["build-css", "test"], "build-html"));

results:

E:\GitHub\myblog>gulp
[17:47:45] Using gulpfile E:\GitHub\myblog\gulpfile.js
[17:47:45] Starting 'default'...
[17:47:45] Starting 'build-css'...
[17:47:45] Starting 'build-img'...
[17:47:45] Starting 'test'...
[17:47:45] Starting 'build-js'...
[17:47:45] Finished 'build-img' after 24 ms
[17:47:45] Finished 'build-css' after 627 ms
[17:47:45] Finished 'build-js' after 713 ms
[17:47:45] Finished 'test' after 727 ms
[17:47:45] Starting 'build-html'...
[17:47:45] Finished 'build-html' after 46 ms
[17:47:45] Finished 'default' after 839 ms

Lisence

MIT

gulp-tosync's People

Contributors

whxaxes avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.