gulp-typescript

Typescript compilation errors not being displayed in VS2015 using gulp-typescript

旧巷老猫 提交于 2020-01-22 14:34:08
问题 This is something that some days ago was working fine, so I am not sure what has changed since then (other than updating to ASP.NET Core RC2 and installing some extension for VS2015 as I recall) The issue is that when running from VS2015 a Gulp task to compile my typescript files, if there is an error it shows for example: [10:02:54] Compiling typescript into javascript [10:02:56] TypeScript: 1 semantic error [10:02:56] TypeScript: emit succeeded (with errors) [10:02:56] Finished 'compile'

typescript output order - gulp equivalent to tsc with tsconfig.json

佐手、 提交于 2019-12-22 08:57:53
问题 Given a tsconfig file and using command-line tsc, everything is working as it should. However, using gulp-typescript with a tsconfig.json and outFile specified creates different output ordering - my problem is that I can't find a gulp way to generate the same javascript as tsc does. Our build workflow is based on gulp; but tsc is the gold-standard, has a nice watch feature, and has broad tooling support (eg http://dev.ivogabe.com/using-vscode-with-gulp-typescript/). It would be great if I

Angular 2 Ahead-of-Time Compiler with gulp-typescript

与世无争的帅哥 提交于 2019-12-20 10:23:40
问题 Angular 2 rc 6 written in Typescript 2.0.2 I'm trying to learn Ahead-of-Time compilation as outlined here. It seems simple enough: Run ngc instead of the Typescript compiler to generate .ngfactory.ts files Replace platformBrowserDynamic().bootstrapModule() with platformBrowser().bootstrapModuleFactory() I'm not sure how to apply the first step to my setup. I use gulp-typescript 2.13.6 to compile my typescript to JavaScript. gulpfile.js var ts = require('gulp-typescript'); var tsProject = ts

gulp-typescript: Problems using createProject

↘锁芯ラ 提交于 2019-12-13 01:14:52
问题 I have been trying to use gulp-typescript with some degree of success but I have a small issue. All my code is stored under 'src' and I want these to be compiled to '.tmp' but without the 'src' being included. here is my code, I think the issue is that passing a value (glob) to tsProject.src isn't supported so I get /.tmp/src/aTypescriptFile.js for example This code I got directly from the github repo, what I really didn't understand is why gulp.src is replaced with tsProject.src Any ideas ?

Using Gulp how to first compile Typescript then concatenate the result and uglify it?

半腔热情 提交于 2019-12-07 18:19:40
问题 I'm working on a project using Typescript currently I'm facing a problem compiling Typescript and then concatenate the result using Gulp . var gulp = require('gulp'); var ts = require('gulp-typescript'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); gulp.task('default', function () { gulp.src('vendor/**/*.js') // I want to add ts files then combile and concat .gulp.src('src/**/*.ts') .pipe(sourcemaps.init()) .pipe(ts({ noImplicitAny: true, out: 'output.js' }))

typescript output order - gulp equivalent to tsc with tsconfig.json

醉酒当歌 提交于 2019-12-05 14:14:12
Given a tsconfig file and using command-line tsc, everything is working as it should. However, using gulp-typescript with a tsconfig.json and outFile specified creates different output ordering - my problem is that I can't find a gulp way to generate the same javascript as tsc does. Our build workflow is based on gulp; but tsc is the gold-standard, has a nice watch feature, and has broad tooling support (eg http://dev.ivogabe.com/using-vscode-with-gulp-typescript/ ). It would be great if I could make our gulp-based build work the same as tsc. Example tsconfig.json : { "compilerOptions": {

Angular 2 Ahead-of-Time Compiler with gulp-typescript

余生长醉 提交于 2019-12-02 19:38:02
Angular 2 rc 6 written in Typescript 2.0.2 I'm trying to learn Ahead-of-Time compilation as outlined here . It seems simple enough: Run ngc instead of the Typescript compiler to generate .ngfactory.ts files Replace platformBrowserDynamic().bootstrapModule() with platformBrowser().bootstrapModuleFactory() I'm not sure how to apply the first step to my setup. I use gulp-typescript 2.13.6 to compile my typescript to JavaScript. gulpfile.js var ts = require('gulp-typescript'); var tsProject = ts.createProject('tsconfig.json', { //Use TS version installed by NPM instead of gulp-typescript's built

Typescript2 path module resolution

爱⌒轻易说出口 提交于 2019-11-29 11:42:19
tl;dr : module resolution does not apply ? Hello, I am playing around with Typescript2 module resolution feature. I've noticed that it is now possible to specify "Paths", so that you can do the following : Old way import {a} from "../../../foo" New way import {a} from "services/foo" To do so, you need to add some configs to your tsconfig.json "compilerOptions": { "baseUrl": ".", "paths": { "services/*": ["./application/core/services/*"], } } Problem that I have, is that when compiled, the import actually doesn't change. My javascript output still contains that import from "services/foo", so

Typescript build getting errors from node_modules folder

三世轮回 提交于 2019-11-29 01:45:49
I am running a typescript build and getting errors in node_modules. Why isn't it ignoring this folder? I have it in the exclude section of my tsconfig.json. The really strange thing is that I have another project that I have done a file comparison with and it does not throw these errors even though gulpfile.js, tsconfig.json and the node_modules folders are identical. What else can I check? Errors: c:/Dev/streak-maker/node_modules/angular2/src/core/change_detection/parser/locals.d.ts(3,14): error TS2304: Cannot find name 'Map'. c:/Dev/streak-maker/node_modules/angular2/src/core/change

Typescript2 path module resolution

拥有回忆 提交于 2019-11-28 04:38:47
问题 tl;dr : module resolution does not apply ? Hello, I am playing around with Typescript2 module resolution feature. I've noticed that it is now possible to specify "Paths", so that you can do the following : Old way import {a} from "../../../foo" New way import {a} from "services/foo" To do so, you need to add some configs to your tsconfig.json "compilerOptions": { "baseUrl": ".", "paths": { "services/*": ["./application/core/services/*"], } } Problem that I have, is that when compiled, the