series和 paralle

series 串行执行任务

特性:等待慢的一起输出

const { series } = require('gulp');

function javascript(cb) {
  // body omitted
  cb();
}

function css(cb) {
  // body omitted
  cb();
}

exports.build = series(javascript, css);

paralle 并行执行任务

const { parallel } = require('gulp');

function javascript(cb) {
  // body omitted
  cb();
}

function css(cb) {
  // body omitted
  cb();
}

exports.build = parallel(javascript, css);

优点

避免重复任务

运行组合操作时,每次提供时都会执行每个任务

如果你有这样的代码

const { series, parallel } = require('gulp');

const clean = function(cb) {
  // body omitted
  cb();
};

const css = series(clean, function(cb) {
  // body omitted
  cb();
});

const javascript = series(clean, function(cb) {
  // body omitted
  cb();
});

exports.build = parallel(css, javascript);

改良后

const { series, parallel } = require('gulp');

function clean(cb) {
  // body omitted
  cb();
}

function css(cb) {
  // body omitted
  cb();
}

function javascript(cb) {
  // body omitted
  cb();
}

exports.build = series(clean, parallel(css, javascript));

详情参考网址

https://gulpjs.com/docs/en/api/parallel

原文地址:https://www.cnblogs.com/ruange/p/10908289.html

时间: 2024-10-30 06:31:58

series和 paralle的相关文章

POJ 3233 - Matrix Power Series ( 矩阵快速幂 + 二分)

POJ 3233 - Matrix Power Series ( 矩阵快速幂 + 二分) #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; #define MAX_SIZE 30 #define CLR( a, b ) memset( a, b, sizeof(a) ) int MOD = 0; int n, k; st

C# chart,有关如何在鼠标移动到Series上时显示节点及数据 (有待继续更新)

一.效果与思路 效果: 解决方案1 用chart的mousemove时间,实时跟踪鼠标最近的X轴的位置,然后把cursorX设置到那个位置上,让用户知道我是选的那一个X的值,同时用tooltip显示该X轴上所有的Y值,结贴了谢谢大家. 至于如何显示鼠标移动到的那个series上的数据节点,可以在Mousmove时,用一个击中测试,判断. 参考代码,击中测试获得点数据点的索引: if (e.HitTestResult.ChartElementType == ChartElementType.Dat

Cassandra存储time series类型数据时的内部数据结构?

因为我一直想用Cassandra来存储我们的数字电表中的数据,按照之前的文章(getting-started-time-series-data-modeling)的介绍,Cassandra真的和适合用于存储time series类型的数据,那么我就想要弄清楚,对于下面这张表 CREATE TABLE temperature ( weatherstation_id text, event_time timestamp, temperature text, PRIMARY KEY (weathers

深入理解无穷级数和的定义(the sum of the series)

Given an infinite sequence (a1, a2, a3, ...), a series is informally the form of adding all those terms together: a1 + a2 + a3 + ···. To emphasize that there are an infinite number of terms, a series is often called an infinite series. 值得注意的是等式右边并不是左

[NPM] Run npm scripts in series

After creating several npm script it becomes useful to run multiple scripts back-to-back in series. This is a nice feature because you can enforce that one script needs to complete before starting another one. "scripts": { "start": &qu

pandas库学习笔记(一)Series入门学习

Pandas基本介绍: pandas is an open source, BSD-licensed (permissive free software licenses) library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. 我们快速简单地看一下pandas中的基本数据结构,先从数据类型.索引.切片等

C# Chart控件,chart、Series、ChartArea曲线图绘制的重要属性

原文有备份,如有错误和需要改进的地方,请不吝指正会继续修改的 8个月没写博客了- -,一来是有不想继续干开发的想法,二来是赖的写,三来还是不想总结.所以为了继续坚持自己的开发和总结的信念,总结一下C# chart控件的一些基本属性,由于属性太多了,一时半会儿写不完,以后继续补充,这里总结重要的常用的属性 为避免耽误不喜欢这种曲线图效果的亲们的时间,先看一下小DEMO效果图: 先简单说一下,从图中可以看到一个chart可以绘制多个ChartArea,每个ChartArea都可以绘制多条Series

POJ 3233 Matrix Power Series (矩阵快速幂+二分)

Matrix Power Series Time Limit: 3000MS   Memory Limit: 131072K Total Submissions: 16403   Accepted: 6980 Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + - + Ak. Input The input contains exactly one test cas

poj3233Matrix Power Series(矩阵快速幂,两种写法)

Matrix Power Series Time Limit:3000MS     Memory Limit:131072KB     64bit IO Format:%I64d & %I64u Submit Status Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + - + Ak. Input The input contains exactly one t