本文整理汇总了TypeScript中gulp-sourcemaps.write函数的典型用法代码示例。如果您正苦于以下问题:TypeScript write函数的具体用法?TypeScript write怎么用?TypeScript write使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了write函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: getCompilerSettings
gulp.task(instrumenterJsPath, false, [servicesFile], () => {
const settings: tsc.Settings = getCompilerSettings({
outFile: instrumenterJsPath
}, /*useBuiltCompiler*/ true);
return gulp.src(instrumenterPath)
.pipe(newer(instrumenterJsPath))
.pipe(sourcemaps.init())
.pipe(tsc(settings))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest("."));
});
开发者ID:DrewTAJ,项目名称:wowstats,代码行数:11,代码来源:Gulpfile.ts
示例2: merge
gulp.task('tsc:jasmineHelper', () => {
var tsResult = gulp.src(env.path.jasmine.helpers)
.pipe(sourcemaps.init())
.pipe(ts(tsConf));
return merge([
tsResult.dts.pipe(gulp.dest(`${env.dir.jasmine}`)),
tsResult.js.pipe(sourcemaps.write()).pipe(gulp.dest(env.dir.tmpJasmine)),
]);
});
开发者ID:MSakamaki,项目名称:rxjs-handson,代码行数:11,代码来源:typescript.ts
示例3: error
gulp.task("scripts:tsjs", ["scripts:coffee", "scripts:js", "scripts:ts"], () => {
function error(err: {message: string}) {
const raw = stripAnsi(err.message)
const result = raw.match(/(.*)(\(\d+,\d+\): error TS(\d+):.*)/)
if (result != null) {
const [, file, rest, code] = result
const real = path.join('src', 'coffee', ...file.split(path.sep).slice(3))
if (fs.existsSync(real)) {
gutil.log(`${chalk.red(real)}${rest}`)
return
}
// XXX: can't enable "6133", because CS generates faulty code for closures
if (["2307", "2688", "6053"].indexOf(code) != -1) {
gutil.log(err.message)
return
}
}
if (!argv.ts)
return
if (typeof argv.ts === "string") {
const keywords = argv.ts.split(",")
for (let keyword of keywords) {
let must = true
if (keyword[0] == "^") {
keyword = keyword.slice(1)
must = false
}
const found = err.message.indexOf(keyword) != -1
if (!((found && must) || (!found && !must)))
return
}
}
gutil.log(err.message)
}
const tree_ts = paths.build_dir.tree_ts
const project = gulp
.src(`${tree_ts}/**/*.ts`)
.pipe(sourcemaps.init())
.pipe(ts(tsconfig.compilerOptions, ts.reporter.nullReporter()).on('error', error))
return merge([
project.js
.pipe(sourcemaps.write("."))
.pipe(gulp.dest(paths.build_dir.tree_js)),
project.dts
.pipe(gulp.dest(paths.build_dir.types)),
])
})
开发者ID:jsalcal,项目名称:bokeh,代码行数:54,代码来源:scripts.ts
示例4: compileTypeScriptFor
function compileTypeScriptFor(moduleType: string) {
const options = project.plugin.outputs[moduleType].settings;
const compile = createCompiler(options);
return gulp
.src(path.join(root, project.plugin.src, '**/*.ts'))
.pipe(sourcemaps.init())
.pipe(compile())
.pipe(sourcemaps.write({ sourceRoot: project.plugin.src }))
.pipe(gulp.dest(path.join(project.plugin.output, moduleType)));
}
开发者ID:jbockle,项目名称:aurelia-json-schema-form,代码行数:11,代码来源:typescript-compilation.ts
示例5: getCompilerSettings
gulp.task(run, false, [servicesFile], () => {
const settings: tsc.Settings = getCompilerSettings({
outFile: run
}, /*useBuiltCompiler*/ true);
return gulp.src(harnessSources)
.pipe(newer(run))
.pipe(sourcemaps.init())
.pipe(tsc(settings))
.pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" }))
.pipe(gulp.dest("."));
});
开发者ID:Yanbuodiao,项目名称:TypeScript,代码行数:11,代码来源:Gulpfile.ts
示例6:
export = gulp.task('development:styles', () => {
return gulp
.src(paths.sources.styles)
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(autoprefixer(config.autoprefixer))
.pipe(sourcemaps.write())
.pipe(gulp.dest(paths.output.styles))
.on('error', errors)
.pipe(browsersync.stream());
});
开发者ID:mogusbi,项目名称:ts-starter,代码行数:11,代码来源:styles.ts
示例7:
gulp.task('tsc:e2e', () => {
return gulp.src(env.path.spec.protractor)
.pipe(sourcemaps.init())
.pipe(ts({
target: 'es5',
module: "commonjs",
noImplicitAny: true,
moduleResolution: 'node',
}))
.pipe(sourcemaps.write())
.pipe(gulp.dest(env.dir.tmpE2e));
});
开发者ID:MSakamaki,项目名称:rxjs-handson,代码行数:12,代码来源:typescript.ts
示例8: tsProjectFn
gulp.task('build:js', 'compile *.ts files into *.js files', ['build:tslint'], () => {
var tsProject = tsProjectFn();
var tsResult = gulp.src(PATH.src.ts)
.pipe(printFiles())
.pipe(sourcemaps.init())
.pipe(tsc(tsProject));
return tsResult.js
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(PATH.dest.base));
});
开发者ID:AdamFaron,项目名称:FOO,代码行数:12,代码来源:gulpfile.ts
注:本文中的gulp-sourcemaps.write函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论