本文整理汇总了TypeScript中webpack-stream.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: build
function build(name: string) {
var arr = name.split('/')
var filename = _.kebabCase(name.split('/')[0]) + '.js'
if (arr.length === 3) {
filename = _.kebabCase(name.split('/')[1]) + '.js'
}
var options: any = {
errorDetails: true,
debug: false,
output: {
filename: filename.toLowerCase()
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.js']
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
{ test: /\.less$/, exclude: /node_modules/, loader: 'style!css!less' }
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({minimize: true})
]
}
return gulp.src('./' + name + '.js')
.pipe(webpackStream(options))
.pipe(gulp.dest('./public/assets/js'))
}
开发者ID:starlying,项目名称:projs,代码行数:29,代码来源:pack.ts
示例2:
export = () => {
return gulp.src([
'src/client/app/index.js',
'src/client/tests/entries/*.js',
'src/client/tests/entries/upload/upload.js' ])
.pipe(webpack(config))
.pipe(gulp.dest('dist/dev'));
};
开发者ID:mapkiwiz,项目名称:sectorisation,代码行数:8,代码来源:webpack.dev.ts
示例3:
const streams = entriesAndSources.map(({ entry, name, sources }: IEntry): any =>
settings.gulp
.src(sources)
.pipe(sourcemaps.init())
.pipe(webpack({
entry,
externals,
output: {
library: name,
libraryTarget: "amd"
}
}))
.pipe(rename(`${name}.js`))
.pipe(uglify())
.pipe(sourcemaps.write("."))
.pipe(settings.gulp.dest(Constants.folders.dist)));
开发者ID:FullScreenShenanigans,项目名称:gulp-shenanigans,代码行数:16,代码来源:webpack.ts
示例4:
gulp.task('webpack', ()=> {
return gulp.src('src/main.ts')
.pipe(webpack(require('../webpack.config.js')))
.pipe(gulp.dest('public/scripts'))
});
开发者ID:stolpnik,项目名称:angular2-test,代码行数:5,代码来源:webpack.ts
示例5:
export = () => {
return gulp.src('src/client/app/index.js')
.pipe(webpack(config))
.pipe(gulp.dest('dist/prod'));
};
开发者ID:mapkiwiz,项目名称:sectorisation,代码行数:5,代码来源:webpack.prod.ts
注:本文中的webpack-stream.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论