• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript gulp-typescript.default函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中gulp-typescript.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了default函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: compile

function compile(isRelease: boolean) {
    var tsProject = ts.createProject({
        removeComments: true,  // Do not emit comments to output.
        //noImplicitAny: false,  // Warn on expressions and declarations with an implied 'any' type.
        //noLib: false,  // Don't include the default lib (with definitions for - Array, Date etc)
        //noEmitOnError: false,  // Do not emit outputs if any type checking errors were reported.
        //target: "ES3",  // Specify ECMAScript target version: 'ES3' (default), 'ES5' or 'ES6'.
        //module: "",  // Specify module code generation: 'commonjs' or 'amd'
        //sourceRoot: "",  // Specifies the location where debugger should locate TypeScript files instead of source locations.
        declarationFiles: false,  // Generates corresponding .d.ts files.
        noExternalResolve: false,  // Do not resolve files that are not in the input. Explanation below.
        sortOutput: true,  // Sort output files. Usefull if you want to concatenate files (see below).
    });


    var tsResult = gulp.src(srcGlob)
        .pipe(ts(tsProject, { referencedFrom: ['Application.ts'] }));

    return tsResult.js
        .pipe(concat('app.js'))
        //.pipe(ngAnnotate())
        //.pipe(gulpIf(isRelease, uglify()))
        //.pipe(uglify())
        .pipe(gulp.dest('Chokaigi2015/html/js'));
}
开发者ID:yuhki50,项目名称:pepper-chokaigi2015,代码行数:25,代码来源:typescript.ts


示例2: function

gulp.task('buildServer' ,['clearBuildDir'], function () {
      var typescript = require('gulp-typescript');
    var tscConfig = require('./tsconfig.json');
    var tScriptResult = gulp.src(PATHS.src)
       .pipe(typescript(tscConfig.compilerOptions));
    return tScriptResult.js.pipe(gulp.dest('build/'));
});
开发者ID:RidaRidss,项目名称:Student_Management_System,代码行数:7,代码来源:gulpfile.ts


示例3: merge

gulp.task("compile", function() {
	var tsResult = tsProject.src()
		.pipe(sourcemaps.init())
		.pipe(ts(tsProject));
	
	var dts = tsResult.dts
		.pipe(insert.transform(function(contents: string, file: any) {
			contents = contents.replace(/\/\/\/\s*\<reference path=".*"\s*\/\>\s*\n/ig, "");
			contents += "declare module \"updraft\" {\n" +
									"	export = Updraft;\n" +
									"}\n";
			return contents;
		}));
	
	dts = tsResult.dts.pipe(gulp.dest("./"));
	
	var js = tsResult.js;
	
	js = js.pipe(insert.transform(function(contents: string, file: any) {
		contents = contents.replace(/(Updraft = {})/g, "/* istanbul ignore next */ $1");
		contents = contents.replace(/(var _a(,|;))/g, "/* istanbul ignore next */ $1");
		return contents;
	}));
	

	if(minify) {
		js = js.pipe(uglify());
	}
	
	js = js
		.pipe(sourcemaps.write("./"))
		.pipe(gulp.dest("./"));

	return merge([dts, js]);
});
开发者ID:arolson101,项目名称:updraft,代码行数:35,代码来源:Gulpfile.ts


示例4:

gulp.task('!build:commonjs', () => gulp
  .src([
    'src/**/*.ts',
    'typings/browser/**/*.d.ts'
  ])
  .pipe(ts(commonCompilerConfig))
  .pipe(gulp.dest('dist/src')));
开发者ID:chrisjordanme,项目名称:mobile-toolkit,代码行数:7,代码来源:gulpfile.ts


示例5:

gulp.task("compile", () => {
    var tsResult = gulp.src("src/**/*.ts")
        .pipe(sourcemaps.init())
        .pipe(tsc(tsProject));
    return tsResult.js
        .pipe(gulp.dest("../webapp"));
});
开发者ID:solairerove,项目名称:blog-app,代码行数:7,代码来源:gulpfile.ts


示例6: function

gulp.task('compile-typescript', function () {
    var streamFinished = function () {
        gutil.log('End stream');
    };
    var entry = config.paths.app + '/main.ts';
    var fileName = path.basename(entry, path.extname(entry)) + ".js";
    return gulp.src(entry)
        .pipe(ts({
            target: "ES5",
            noImplicitAny: false,
            moduleResolution: "node",
            outFile: fileName,
            removeComments: true,
            experimentalDecorators: true
        }))
        .pipe(wrap({ src: 'template.txt' }))
        .pipe(rename({ suffix: '.debug' }))
        .pipe(gulp.dest(config.paths.pub))
        .pipe(uglify())
        .pipe(rename(fileName))
        .pipe(gulp.dest(config.paths.pub))
        .on('end', streamFinished);


    //.pipe(wrap('(function($){\n"use strict";\n<%= contents %>\n})(jQuery);'))
    //.pipe(rename(fileName))

});
开发者ID:alekspolitov,项目名称:TypeScriptTest,代码行数:28,代码来源:gulpfile.ts


示例7: compilePublic

function compilePublic() {
    gulp.src(pathToPublicTs)
        .pipe(sourcemaps.init())
            .pipe(tsc(new tsconfig('system', true, true)))
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('./public'));
}
开发者ID:cwadrupldijjit,项目名称:parallax-example,代码行数:7,代码来源:gulpfile.ts


示例8: compileServer

function compileServer() {
    gulp.src(pathToServerTs)
        .pipe(sourcemaps.init())
            .pipe(tsc(new tsconfig('commonjs', null, null)))
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('./server'));
}
开发者ID:cwadrupldijjit,项目名称:parallax-example,代码行数:7,代码来源:gulpfile.ts


示例9: function

gulp.task('build-release', ['vet', 'clean-code'], function() {
    console.log('Compiling Typescript files for Release');
    return gulp
        .src(config.sourceTs)
        .pipe(tsc(config.tsc))
        .pipe(gulp.dest(config.build));
    }
开发者ID:dcaballeroc,项目名称:unicron,代码行数:7,代码来源:gulpfileTypescript.ts


示例10: require

gulp.task('karma:build', () => {
  const typescript = require('gulp-typescript');
  const sourcemaps = require('gulp-sourcemaps');
  const tplinline = require('gulp-inline-ng2-template');
  const errors = require('../utils/errors');
  const paths = require('../config/paths');

  const config = {
    typescript: require('../config/typescript'),
    tplinline: require('../config/tplinline')
  };

  const tsProject = typescript.createProject(paths.typescript.appConfig, config.typescript);

  return gulp
    .src([
      paths.typings,
      paths.sources.scripts,
      '!' + paths.sources.bootstrap,
      '!' + paths.scripts.tests.e2e
    ])
    .pipe(sourcemaps.init())
      .pipe(tplinline(config.tplinline))
      .pipe(typescript(tsProject))
      .js
    .pipe(sourcemaps.write())
    .on('error', errors)
    .pipe(gulp.dest(paths.output.app));
});
开发者ID:mogusbi,项目名称:ts-starter,代码行数:29,代码来源:karma.ts



注:本文中的gulp-typescript.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript gulp-typescript.reporter类代码示例发布时间:2022-05-25
下一篇:
TypeScript gulp-typescript.createProject函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap