本文整理汇总了TypeScript中gulp-concat类的典型用法代码示例。如果您正苦于以下问题:TypeScript gulp-concat类的具体用法?TypeScript gulp-concat怎么用?TypeScript gulp-concat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了gulp-concat类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Promise
return new Promise((resolve, reject) => {
gulp.src('src/index.html')
.pipe(gulp.dest(`www`))
.on('end', () => {
count ++
count === 5 ? resolve() : null
})
gulp.src(['./src/images/*'])
.pipe(gulp.dest(`www/images/`))
.on('end', () => {
count ++
count === 5 ? resolve() : null
})
minHtml(target)
.on('end', () => {
count ++
count === 5 ? resolve() : null
})
gulp.src([
'node_modules/ionic-release/fonts/*',
'tools/libs/fonts/teambition*'
])
.pipe(gulp.dest(`www/fonts/`))
.on('end', () => {
count ++
count === 5 ? resolve() : null
})
gulp.src('node_modules/ionic-release/css/ionic.css')
.pipe(concat('lib.css'))
.pipe(gulp.dest(`www/css/`))
.on('end', () => {
count ++
count === 5 ? resolve() : null
})
})
示例2: tsCompile
task('e2e.bundle', function () {
return tsCompile(getTscOptions('es6'), 'system')
.pipe(babel(babelOptions))
.pipe(remember('system'))
.pipe(concat('ionic.system.js'))
.pipe(dest(`${DIST_NAME}/bundles`))
.pipe(connect.reload());
});
示例3: Promise
return new Promise((resolve, reject) => {
gulp.src('./src/components/et/**/*.html')
.pipe(compile())
.pipe(concat('et.js'))
.pipe(gulp.dest('.tmp/scripts/et/'))
.on('end', () => {
resolve()
})
})
示例4:
gulp.task("index", [], () => {
// Combine external scripts into single file
gulp.src(config.SCRIPT_DEPENDENCIES)
.pipe(sourcemaps.init())
.pipe(concat(config.SCRIPT_COMBINED))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest(config.APP_DIST));
// Combine external styles into single file
gulp.src(config.STYLES_DEPENDENCIES)
.pipe(sourcemaps.init())
.pipe(concat(config.STYLES_COMBINED))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest(config.APP_DIST));
// Copy all HTML files
gulp.src(join(config.APP_SRC, "**/*.html"))
.pipe(gulp.dest(config.APP_DIST));
});
示例5: default
export default (target: string) => {
const paths = {
less: [
'./src/less/*.less',
'./src/components/**/*.less',
`./src/${target}/**/*.less`
],
tbui: [
'./src/less/tb-fonts-variables.less',
'./tools/libs/less/teambition-ui-variables.less',
'./tools/libs/less/teambition-ui-icons.less'
]
}
const stream = merge2(
gulp.src(paths.tbui)
.pipe(concat('tbui.less'))
.pipe(logError(less())),
gulp.src(paths.less)
.pipe(sourcemaps.init({
loadMaps: true
}))
.pipe(logError(less()))
.pipe(sourcemaps.write())
)
.pipe(sourcemaps.init({
loadMaps: true
}))
.pipe(concat('app.css'))
.pipe(autoprefixer({
browsers: ['last 2 versions']
}))
.pipe(sourcemaps.write())
.pipe(gulp.dest(`www/css/`))
return new Promise((resolve, reject) => {
stream.on('end', () => {
gutil.log(gutil.colors.yellow('complete less'))
resolve()
})
})
}
示例6: task
task(`concat-${taskPostfix}`, [type === 'min' ? 'uglify' : 'babel'], function (done) {
const stream = gulp.src([vendorPath, getName(bundlePath), getName(templatePath)])
.pipe(concat(jsFileName))
.pipe(gulp.dest(`${targetPath}/js`));
stream.on('end', function () {
readFile(`${targetPath}/js/${jsFileName}`, { encoding: 'utf8' }).then((file) => {
outputFile(`${targetPath}/js/${jsFileName}`, file)
.then(() => done());
});
});
});
示例7: merge
task('demos.bundle', function () {
var tsResult = tsCompile(getTscOptions('es6'), 'system')
.pipe(babel(babelOptions));
var swiper = src('src/components/slides/swiper-widget.system.js');
return merge([tsResult, swiper])
.pipe(remember('system'))
.pipe(concat('ionic.system.js'))
.pipe(dest(`${DIST_NAME}/bundles`))
.pipe(connect.reload());
});
示例8: filter
gulp.task('default', () => {
const jsFilter = filter('**/*.js', {restore: true});
const lessFilter = filter('**/*.less', {restore: true});
return gulp.src('assets/**')
.pipe(jsFilter)
.pipe(concat('bundle.js'))
.pipe(jsFilter.restore)
.pipe(lessFilter)
.pipe(less())
.pipe(lessFilter.restore)
.pipe(gulp.dest('out/'));
});
示例9:
gulp.task('css', () => {
const files = [
paths.build + '/**/*.css',
paths.node_modules + '/ng2-material/ng2-material.css',
paths.node_modules + '/ng2-material/font/font.css'
]
gulp.src(files)
.pipe(sourcemaps.init())
.pipe(concat('app.css'))
//.pipe(cssmin())
//.on('error', handleErrors)
.pipe(sourcemaps.write())
.pipe(gulp.dest(paths.build + '/app'));
});
示例10: task
task(`concat-${taskPostfix}`, [type === 'min' ? 'uglify' : 'babel'], function (done) {
const stream = gulp.src([vendorPath, getName(bundlePath), getName(templatePath)])
.pipe(concat(jsFileName))
.pipe(gulp.dest(join(targetPath, 'js')));
stream.on('end', function () {
readFile(join(targetPath, 'js', jsFileName), { encoding: 'utf8' }).then((file) => {
if (buildName === 'desktop') {
file = `(function () {\nvar module = undefined;\n${file}})();`;
}
outputFile(join(targetPath, 'js', jsFileName), file)
.then(() => done());
});
});
});