Questions tagged [grunt-ts]

A Grunt plugin that compiles TypeScript down to JavaScript for running in non-TypeScript environments.

Helps to compile and manage your TypeScript project. TypeScript allows you to write your code as you like, for example you can use java/C class style constructs.

30 questions
1
vote
1 answer

grunt-ts and tsc producing different results

I am using a tsconfig.json file in conjunction with grunt-ts here is the grunt task: ts: { default: { tsconfig: true } and the tsconfig.json file: { "compilerOptions": { "target": "es5", "module": "system", …
Gabe O'Leary
  • 2,010
  • 4
  • 24
  • 41
1
vote
0 answers

Grunt watch & TypeScript - How to make it faster?

I have a complicated workflow of TS compilation and I want to make my watchers faster (and still smarts). I currently have 3 different TS compilation that are executed when Grunt starts but also on watch changes. grunt-ts…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
1
vote
1 answer

Unable to find symbol 'Components'

I've got 3 modules in 3 separate folders, each (test-wise) with one file: components/pagedList.ts directives/testDirective.ts entity1/entity1.ts Which approx. look like this // pagedList.ts module App.Components { export interface…
xvdiff
  • 2,179
  • 2
  • 24
  • 47
1
vote
1 answer

Stop grunt-ts from compiling references

I've recently switched from using Web Essentials to grunt-ts to compile my typescript files due to the flexibility of output. Part of the reason I switched is that I don't want all files compiled seperately, and I don't want to have all files…
James Hay
  • 7,115
  • 6
  • 33
  • 57
0
votes
0 answers

Generate sourcemap files with grunt-ts

Hi I am beggining a a project with typescript and it uses grunt-ts to compile to javascript. My configs in a file: tsconfig.json are: { "compileOnSave": true, "compilerOptions": { "target": "es5", "noImplicitAny": true, …
saomi
  • 855
  • 5
  • 16
  • 38
0
votes
2 answers

Grunt generates new node_modules

I'm creating a grunt config to compile all my Typescript files to Javascript. I want to save all my generated Javascript files in a build folder but also keep the same folder structure. Example: src/controllers/myController.ts will compile to:…
Bob van 't Padje
  • 685
  • 1
  • 6
  • 17
0
votes
1 answer

Move compiled Typescript files to parent directory grunt

I'm having some problems trying to output my compiled Typescript files to my parent directory. Let's say I have a structure like this: app routes | src | test.ts | test2.ts In this example, I want my compiled test.js and…
user3781239
  • 141
  • 4
  • 13
0
votes
1 answer

grunt-ts multiple outputdir

I have this grunt file module.exports = function (grunt) { grunt.initConfig({ ts: { compileTwoSetsOfFilesToDirUsingArrayStyle: { files: [ { src:…
Louis Michael
  • 398
  • 1
  • 12
0
votes
1 answer

Issues with require.js and sourcemaps when compiling typescript with grunt-ts

When using grunt-ts and specifying and out file my app runs as expected, but since that option has no support for fast compilation, i tried using a regular compilation where all my .ts files live on the dist folder There are two issues, first, it…
Lu Roman
  • 2,220
  • 3
  • 25
  • 40
0
votes
1 answer

Grunt ts task configuration - no files found

I am trying to include TS compilation to my project. This is my tsconfig.json: { "compilerOptions": { "emitDecoratorMetadata": true, "experimentalDecorators": true, "module": "system", "moduleResolution": "node", …
mp3por
  • 1,796
  • 3
  • 23
  • 35
0
votes
0 answers

grunt-ts compile error non-emit-preventing type warnings

I'm trying to build a project with grunt and angular 2. I saw that there's a special version of grunt to support ts (grunt ts- https://www.npmjs.com/package/grunt-ts). When I try to build the project with some type scripts files I'm getting the…
Gili Yaniv
  • 3,073
  • 2
  • 19
  • 34
0
votes
1 answer

Typescript with angular2 and grunt error TS2304: Cannot find name

In my angular2 Project am using grunt to automate compile my typescript files. All is doing well my files are compiling but am always getting errors app/webapp/ng2/audit_logs/auditLogs.ts(2,3): error TS2304: Cannot find name…
The Mechanic
  • 2,301
  • 1
  • 26
  • 37
0
votes
1 answer

Turning .html templates into AMD modules with grunt-ts

Using grunt-ts with say the html: ["*.tpl.html"] option, it compiles *.tpl.html files in the end into *.tpl.html.js files, which set a global var. Can I instead tell grunt-ts to output the final .js file in a different module syntax, such as AMD or…
P Varga
  • 19,174
  • 12
  • 70
  • 108
0
votes
1 answer

Output emitted JS files from referenced TS files into single folder, without subfolders

I have a TypeScript file with a reference; the referenced file in turn has other references. When I run the grunt-ts task, a hierarchy of subfolders is created, mirroring the reference hierarchy, and each corresponding JS file is written into a…
Zev Spitz
  • 13,950
  • 6
  • 64
  • 136
0
votes
2 answers

Running grunt task only on changed file

I have a grunt ts task that transpiles typescript files to javascript. On gunt serve I'm transpiling all the .ts files I have. Then I'd like to configure grunt to watch the .ts files but transpile ONLY the .ts file that has been changed. After…
Dimkin
  • 670
  • 2
  • 9
  • 22
1
2