本文整理汇总了TypeScript中gulp-replace.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: Scaffolding
export default function Scaffolding() {
let name = helper.getCurrentTarget();
if (!name) {
return Promise.reject(new Error("Missing required project name"));
}
let projectPath = path.resolve(__dirname, "../../scaffolding", helper.getProjectType());
return gulp.src(projectPath + '/**/*')
.pipe(replace("$$NAME", name))
.pipe(gulp.dest(`./${name}`));
}
开发者ID:mtfranchetto,项目名称:smild,代码行数:10,代码来源:Scaffolding.ts
示例2: html2js
() => {
var filename = debuggerIndexFile,
filePath = path.resolve(__dirname, filename),
source = fs.readFileSync(filePath, 'utf8');
var tpl = html2js(source, {
mode: 'default',
wrap: false
});
return gulp.src(SOURCE_DIR + '/' + DEBUGGER_NAMESPACE + '/debug.js')
.pipe(template({
template: tpl
}))
.pipe(gulpif(minify, uglify()))
.pipe(gulpif(env === 'dev', replace(/##host##/g, `${baseUrl}container-debugger`)))
.pipe(gulp.dest(DEST_DIR + '/' + DEBUGGER_NAMESPACE));
}
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:20,代码来源:Gulpfile.ts
示例3: packageReplaceReferences
/**
* Removes /// <reference from compiled sources.
*/
@Task()
packageReplaceReferences() {
return gulp.src("./build/package/**/*.d.ts")
.pipe(replace(`/// <reference types="node" />`, ""))
.pipe(replace(`/// <reference types="chai" />`, ""))
.pipe(gulp.dest("./build/package"));
}
开发者ID:waltercassiano,项目名称:typeorm,代码行数:10,代码来源:gulpfile.ts
示例4:
gulp.task('task:commonjs:rewrite_plugins', () => gulp
.src([
'tmp/es5/src/plugins/**/*.js'
])
.pipe(replace(/'@angular\/service-worker\/worker'/, "'../../worker'"))
.pipe(replace(/"@angular\/service-worker\/worker"/g, "'../../worker'"))
.pipe(gulp.dest('tmp/es5/src/plugins')));
开发者ID:madhu-amrit,项目名称:mobile-toolkit,代码行数:7,代码来源:gulpfile.ts
示例5: bundleRenameDev
function bundleRenameDev() {
src([
`${LIB_DIR}/**/*.*`,
], { base: './' })
.pipe(replace('@nebular', '@nebular-dev'))
.pipe(dest('./'));
}
开发者ID:kevinheader,项目名称:nebular,代码行数:7,代码来源:bundle.ts
示例6: Promise
return new Promise((resolve, reject) => {
gulp
.src('compiled/ngc/modules/**/*')
.pipe(rename(buildUtils.stripSrcFromPath))
.pipe(replace(/\.\/src\//g, './'))
.pipe(gulp.dest('dist'))
.on('error', reject)
.on('end', resolve);
});
开发者ID:vvakame,项目名称:universal,代码行数:9,代码来源:gulpfile.ts
示例7: Promise
return new Promise((resolve) => {
var doneCount = 0;
output.js
.pipe(rename(buildUtils.stripSrcFromPath))
.pipe(replace(/\.\/src\//g, './'))
.pipe(gulp.dest('dist'))
.on('end', maybeDone),
output.dts
.pipe(rename(buildUtils.stripSrcFromPath))
.pipe(replace(/\.\/src\//g, './'))
.pipe(gulp.dest('dist'))
.on('end', maybeDone);
function maybeDone() {
doneCount++;
if (doneCount === 2) {
resolve();
}
}
});
开发者ID:jeckhart,项目名称:universal,代码行数:20,代码来源:gulpfile.ts
示例8: join
export = () => {
return gulp.src([
join(Config.APP_SRC, '**/*.ts'),
join(Config.APP_SRC, '**/*.json'),
'!' + join(Config.APP_SRC, '**/*.spec.ts'),
'!' + join(Config.APP_SRC, '**/*.e2e-spec.ts')
])
// import in dev mode: import * as moment from 'moment';
// import for rollup: import moment from 'moment';
.pipe(replace('import * as moment from \'moment\';', 'import moment from \'moment\';'))
// .pipe(replace('import * as uuid from \'node-uuid\';', 'import uuid from \'node-uuid\';'))
.pipe(gulp.dest(Config.TMP_DIR));
};
开发者ID:radiorabe,项目名称:raar-ui,代码行数:13,代码来源:copy.prod.rollup.aot.ts
示例9:
() => {
return gulp.src([
DEST_DIR + '/' + DEBUGGER_NAMESPACE + '/index.test.html',
DEST_DIR + '/' + DEBUGGER_NAMESPACE + '/index.test.referrer.html'
])
.pipe(ejs({
getLocale: i18n.getLocale,
version: versionJson.version,
__: i18n.__
}))
.pipe(replace(/##host##/g, baseUrl + '/' + DEBUGGER_NAMESPACE))
.pipe(gulp.dest(DEST_DIR + '/' + DEBUGGER_NAMESPACE));
}
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:15,代码来源:Gulpfile.ts
示例10: packageReadmeFile
/**
* This task will replace all typescript code blocks in the README (since npm does not support typescript syntax
* highlighting) and copy this README file into the package folder.
*/
@Task()
packageReadmeFile() {
return gulp.src("./README.md")
.pipe(replace(/```typescript([\s\S]*?)```/g, "```javascript$1```"))
.pipe(gulp.dest("./build/package"));
}
开发者ID:IrieLabs,项目名称:ngx-popover,代码行数:10,代码来源:gulpfile.ts
注:本文中的gulp-replace.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论