本文整理汇总了TypeScript中gulp-inject.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: pipelineFunction
export default function pipelineFunction() {
let transform = (filepath, file, index, length) => {
var path = Path.normalize('.' + filepath);
var application = Path.normalize(root.path());
var tsfile = Path.relative(application, path);
var jsfile = tsfile.replace(/\\/g, '/').replace('.ts', '.js');
return `+script("${jsfile}")`;
};
var jsOptions = {
starttag: '//js',
endtag: '//end-js',
transform: transform
};
var application = root.application;
var controller = new file(application.path(), '/js/**/*.ts');
var controllerSource: string[] = [
controller.toString(),
new file(application.path(), '/**/*.d.ts').Not()
];
return gulp.src(root.application.jadeScripts().toString())
.pipe(inject(gulp.src(controllerSource, { read: false }), jsOptions))
.pipe(gulp.dest(root.path()));
};
开发者ID:ibzakharov,项目名称:angular_project_template,代码行数:28,代码来源:inject-scripts.ts
示例2:
gulp.task('index', () => {
return gulp.src('./app/index.html')
.pipe(inject(gulp.src(['**/*.js', '**/*.css', '!bower_components/**/*'], {
cwd: release ? RELEASE_DIR : BUILD_DIR,
read: false
})))
.pipe(gulp.dest(release ? RELEASE_DIR : BUILD_DIR));
});
开发者ID:ngbinh,项目名称:angular-typescript,代码行数:8,代码来源:gulpfile.ts
示例3:
() => {
let vendors = gulp.src(DEST_DIR + '/' + ADMIN_NAMESPACE + '/vendor.js', {read: false});
let sources = gulp.src([
DEST_DIR + '/' + ADMIN_NAMESPACE + '/*.js',
DEST_DIR + '/' + ADMIN_NAMESPACE + '/app/vendor.css',
DEST_DIR + '/' + ADMIN_NAMESPACE + '/**/*.css',
'!' + DEST_DIR + '/' + ADMIN_NAMESPACE + '/vendor.js'
], {read: false});
return gulp.src(DEST_DIR + '/' + ADMIN_NAMESPACE + '/index.*')
.pipe(inject(vendors, {name: 'vendors', relative: true}))
.pipe(inject(sources, {relative: true, addRootSlash: true}))
.pipe(gulp.dest(DEST_DIR + '/' + ADMIN_NAMESPACE));
}
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:17,代码来源:Gulpfile.ts
示例4: function
gulp.task('gen-ts-refs', () => {
var target = gulp.src(config.appTypeScriptReferences);
var sources = gulp.src([config.allTypeScript], {read: false});
return target.pipe(inject(sources, {
starttag: '//{',
endtag: '//}',
transform: function (filepath) {
return '/// <reference path="../..' + filepath + '" />';
}
})).pipe(gulp.dest(config.typings));
});
开发者ID:Billbrockbank,项目名称:sp-o365-rest,代码行数:11,代码来源:gulpfile.ts
示例5: require
gulp.task('inject', () => {
var wiredep = require('wiredep').stream;
var wiredepOptions = {
bowerJson: require('./bower.json'),
directory: './public/lib',
ignorePath: '../../public'
}
var inject = require('gulp-inject');
var injectSrc = gulp.src(['./public/css/*.css', './public/js/*.js', './public/js/*/*.js'], {read: false});
var injectOptions = {
ignorePath: "/public"
}
return gulp.src(['src/views/*.html'])
.pipe(wiredep(wiredepOptions))
.pipe(inject(injectSrc, injectOptions))
.pipe(gulp.dest('src/views'));
});
开发者ID:Stieve,项目名称:Hackathon2016,代码行数:19,代码来源:gulpfile.ts
注:本文中的gulp-inject.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论