本文整理汇总了TypeScript中event-stream.merge函数的典型用法代码示例。如果您正苦于以下问题:TypeScript merge函数的具体用法?TypeScript merge怎么用?TypeScript merge使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了merge函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: glob
glob('./tmp/**/*.js', (err: Error, files: string[]) => {
const tasks = files.map((entry: string) => {
return browserify({ entries: [entry] })
.bundle()
.pipe(source(entry.replace('tmp', 'resources')))
.pipe(dest('./built'));
});
src('./tmp/common/scripts/*.js')
.pipe(dest('./built/sites/common/scripts/'));
es.merge(tasks).on('end', done);
});
示例2: function
return function () {
const src = es.merge(
gulp.src('src/**', { base: 'src' }),
gulp.src('node_modules/typescript/lib/lib.d.ts')
);
return src
.pipe(compile())
.pipe(gulp.dest(out))
.pipe(monacodtsTask(out, false));
};
示例3: buildTypeScript
function buildTypeScript() {
typescriptCompiler = ts.createProject('tsconfig.json', {
typescript: require('typescript')
});
let src = gulp.src(project.transpiler.source).pipe(changedInPlace({ firstPass: true }));
return eventStream
.merge(src)
.pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
.pipe(typescriptCompiler())
.pipe(gulpif(isJsFile, build.bundle()));
}
示例4: task
task('copy:client-templates', () => {
return es.merge(
src('./src/sites/**/common/views/**/*.jade')
.pipe(dest('./tmp/')),
src('./src/sites/**/pages/**/*.jade')
.pipe(dest('./tmp/')),
src('./src/sites/**/common/widgets/**/*.jade')
.pipe(dest('./tmp/')),
src('./src/sites/common/**/*.jade')
.pipe(dest('./tmp/common'))
);
});
示例5:
gulp.task('copy:client-templates', () => {
return es.merge(
gulp.src('./src/sites/**/common/views/**/*.pug')
.pipe(gulp.dest('./tmp/')),
gulp.src('./src/sites/**/pages/**/*.pug')
.pipe(gulp.dest('./tmp/')),
gulp.src('./src/sites/**/common/widgets/**/*.pug')
.pipe(gulp.dest('./tmp/')),
gulp.src('./src/sites/common/**/*.pug')
.pipe(gulp.dest('./tmp/common'))
);
});
示例6: join
export = () => {
let paths: string[] = [
join(APP_SRC, '**'),
'!' + join(APP_SRC, '**', '*.ts')
].concat(TEMP_FILES.map((p) => { return '!' + p; }));
return es.merge([
gulp.src(paths)
.pipe(gulp.dest(APP_DEST)),
gulp.src(['lib/sigmajs-v1.0.0/sigma.min.js', 'node_modules/markdown/lib/markdown.js'])
.pipe(gulp.dest(APP_DEST))
]);
};
示例7: join
export = () => {
return es.merge([
gulp.src(['lib/sigmajs-v1.0.0/sigma.min.js', 'node_modules/markdown/lib/markdown.js'])
.pipe(gulp.dest(APP_DEST)),
gulp.src([
join(APP_SRC, '**'),
'!' + join(APP_SRC, '**', '*.ts'),
'!' + join(APP_SRC, '**', '*.css'),
'!' + join(APP_SRC, '**', '*.html'),
'!' + join(ASSETS_SRC, '**', '*.js')
].concat(TEMP_FILES.map((p) => { return '!' + p; })))
.pipe(onlyDirs(es))
.pipe(gulp.dest(APP_DEST))
]);
};
示例8: buildTypeScript
function buildTypeScript() {
typescriptCompiler = ts.createProject('tsconfig.json', {
typescript: require('typescript')
});
let dts = gulp.src(project.transpiler.dtsSource);
let src = gulp.src(project.transpiler.source)
.pipe(changedInPlace({firstPass: true}));
return eventStream.merge(dts, src)
.pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
.pipe(sourcemaps.init())
.pipe(typescriptCompiler())
.pipe(sourcemaps.write({ sourceRoot: 'src' }))
.pipe(build.bundle());
}