k-maru / grunt-typescript Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
こんな感じのタスクを0.0.5に食わせるとTypeScript 0.8.1 に食わせるとエラーを吐きます。
TypeScript 0.8.0 だと大丈夫です。
詳しい原因とか解決方法は深く追っている時間がなかったのでわかりません。ごめんなさい。
typescript:{
client:{
src:['client/scripts/main.ts'],
dest:'client/scripts/main.js',
options:{
target:'es5',
sourcemap:true,
declaration_file:true
}
}
}
$ grunt typescript
Running "typescript:client" (typescript) task
TypeError: Cannot read property 'requireSemi' of undefined
at new TypeScriptCompiler (/Users/vvakame/work/hoge/node_modules/typescript/bin/typescript.js:23005:72)
at Object.module.exports (/Users/vvakame/work/hoge/node_modules/grunt-typescript/tasks/typescript.js:220:24)
at Task.helper (/opt/local/lib/node_modules/grunt/lib/util/task.js:119:19)
at Object. (/Users/vvakame/work/hoge/node_modules/grunt-typescript/tasks/typescript.js:118:15)
at Object.task.registerMultiTask.thisTask (/opt/local/lib/node_modules/grunt/lib/grunt/task.js:109:15)
at Object.task.registerTask.thisTask.fn (/opt/local/lib/node_modules/grunt/lib/grunt/task.js:58:16)
at Task. (/opt/local/lib/node_modules/grunt/lib/util/task.js:343:36)
at Task. (/opt/local/lib/node_modules/grunt/lib/util/task.js:319:9)
at Task. (/opt/local/lib/node_modules/grunt/lib/util/task.js:346:11)
at Task.start (/opt/local/lib/node_modules/grunt/lib/util/task.js:359:5)
自分プロダクトに変更。但し、iterable/done対応後に実施
https://www.npmjs.org/package/typescript
https://typescript.codeplex.com/releases/view/118980
New version released!
0.9.7(1.0-RC?)がリリースされたようです…!
Here is the structure:
grunt.js
src/
example/
Declare two sections in the Typescript portion of the grunt.js file:
typescript: {
base: {
src: ['src//*.ts'],
dest: 'src',
options: {
module: 'commonjs', //or amd
target: 'es5', //or es3
base_path: 'src',
sourcemap: 'true'
}
},
examp: {
src: ['example//*.ts'],
dest: 'example',
options: {
...
base_path: 'example',
}
}
},
If "src/foo1234.ts" exists, after grunt runs the files "src/foo1234.js" AND "example/1234.js" will be created. An output file is going to the wrong place and the first three characters of the name are being truncated.
I suspect that some state is being retained between the two calls to grunt-typescript. I think the problem is with the lines:
if(!outputSingle){
var g = path.join(gruntPath, basePath);
writeFile = writeFile.substr(g.length);
but I haven't verified this yet.
When using the current working directory cwd
File option, files are not found.
For example this is not working:
typescript: {
base: {
files: [{
cwd : 'app/scripts',
src: '*.ts',
dest: '.tmp/scripts',
ext: '.js'
}]
}
},
but this is working:
typescript: {
base: {
files: [{
src: 'app/scripts/*.ts',
dest: '.tmp/scripts',
ext: '.js'
}]
}
},
The previous example is working when working using the coffee task.
日本語、連続で失礼します。
Gruntfile 内でのテンプレート記述の対応をご検討いただけたらと思います。
こちらに対応していただけると、例えば現状の以下のような指定を;
typescript: {
base: {
src: ['path/to/typescript/files/**/*.ts'],
dest: 'where/you/want/your/js/files'
}
}
下記のように書けるようになり、他タスクとのパス指定重複を回避できるようになります:
path: {
source: 'path/to',
publish: 'where/you/want'
},
typescript: {
base: {
src: ['<%= path.source %>/typescript/files/**/*.ts'],
dest: '<%= path.publish %>/your/js/files'
}
}
こちらもご検討いただけたらさいわいです。
typescript 1.4 に対応する
今回から以下のバージョン割り振り採用の検討を行う
The generated JavaScript from the build task adds Windows line-endings by default, it would be nice to be able to choose from "lf", "cr", or "crlf".
Greeter.ts:
class Greeter {
constructor(public message: string) {
}
greet() {
return this.message;
}
}
var greeter = new Greeter("Hello world");
Greeter.ts (manual build, then built with grunt-typescript):
@@ -1,11 +1,12 @@
-var Greeter = (function () {
- function Greeter(message) {
- this.message = message;
- }
- Greeter.prototype.greet = function () {
- return this.message;
- };
- return Greeter;
-})();
-
-var greeter = new Greeter("Hello world");
+var Greeter = (function () {^M
+ function Greeter(message) {^M
+ this.message = message;^M
+ }^M
+ Greeter.prototype.greet = function () {^M
+ return this.message;^M
+ };^M
+ return Greeter;^M
+})();^M
+^M
+var greeter = new Greeter("Hello world");^M
+//# sourceMappingURL=Greeter.js.map^M
If grunt loads grunt-typescript after grunt-jsmin-sourcemap, the typescript task fails with the message:
$ grunt
Running "typescript:all" (typescript) task
Warning: Cannot call method 'apply' of undefined Use --force to continue.
Aborted due to warnings.
module.exports = function(grunt) {
require('time-grunt')(grunt);
//require('load-grunt-tasks');
grunt.initConfig({
typescript: {
all: {
src: ['**/*.ts', '!node_modules/**'],
options: {
module: 'commonjs',
target: 'es5',
sourceMap: true,
declaration: false,
comments: true
}
}
}
});
grunt.loadNpmTasks('grunt-jsmin-sourcemap');
grunt.loadNpmTasks('grunt-typescript');
grunt.registerTask('default', ['typescript']);
};
"grunt": "^0.4.5",
"grunt-jsmin-sourcemap": "^1.10.0",
"grunt-typescript": "^0.4.5",
"load-grunt-tasks": "^1.0.0",
"time-grunt": "^1.0.0",
"tsd": "^0.5.7"
My project needed support for full paths in the generated sourcemaps, which should be supported by what in tsc is the experimental fullSourceMapPath
compiler parameter. I've modified grunt-typescript to support this by adding a sourcemap_fullpath
grunt option that sets the emitFullSourceMapPath
compiler setting.
I've also created a test: it does a String.replace() with the dynamic path on the test's expected output so it will expect correctly on every computer/folder.
But there seems to be a problem in the implementation of this feature in TypeScript as it doesn't emit the fullpath of the .ts
file (which makes the whole thing a bit useless :)
Edit: I made a mistake in the test. It turns out tsd
works correctly and uses a relative path from the .js.map
to the .ts
file. While grunt-typescript
doesn't. I've expanded the tests in my branch and will try to find the differences.
My fork with the expanded tests: https://github.com/Bartvds/grunt-typescript/tree/dev/sourcepath
Note my fork is not for merging yet, it has some development code checked in (including demo html and grunt target's). I'll send a proper pull request if it works as expected. Also I noticed I messed up the indentation in some files, I'll remember to correct that before merge :)
E:\WORKSPACE\WindBase>grunt.cmd
Running "typescript:WindBase" (typescript) task
<WARN> E:/WORKSPACE/WindBase/typescripts/directives/directives.ts(6,0): Use --f
orce to continue. </WARN>
Aborted due to warnings.
You can see it only output the first line of the error messages. I can only the the error line number but I don't know what's the reason.
This could be an issue of nodejs version of tsc
, see this question: http://stackoverflow.com/questions/14534511/java-cant-get-full-error-when-running-an-external-command
To fix this problem, maybe you use the tsc.exe
provided by MS, or check the code of nodejs version of typescript, to make sure it return all error messages. (I'm not familiar with nodejs, so I don't know where is wrong)
grunt.registerHelper will be depreciated in grunt 0.4.
To see how helpers will be handled in the future (using standard npm require), check out the following links:
https://github.com/gruntjs/grunt-contrib-uglify/blob/master/tasks/uglify.js#L15 https://github.com/gruntjs/grunt-contrib-uglify/blob/master/tasks/lib/min.js
PS: join us in #grunt on freenode if you have any questions!
すばらしいプラグインをありがとうございます。TypeScriptの勉強に使っています。
表題のオプションが効かないのですが、(hogehoge.d.tsが生成されない)
そちらでは生成されていますでしょうか?
tscでオプションを付加したところ、ファイルが生成されましたので、ソースファイルは問題ない
ようです。
コンパイルしたプロジェクトは以下です
https://github.com/necoco/volksoper
よろしくお願いします。
After upgrade from 0.3.8 to 0.4.1 (0.4.0 behaves equally as 0.4.1) I cannot run the "typescript" task anymore with following error:
>> node_modules/typescript/scripts/processDiagnosticMessages.ts(1,1): error TS6053: File 'node_modules/typescript/src/compiler/sys.ts' not found.
Warning: Task "typescript:all" failed. Use --force to continue.
I'm not sure how to diagnose this, but it seems the task runs really slowly (or starts slowly?) even when there are no typescript files to compile. On my high-end i7 with an SSD, the typescript task takes 13.5 seconds, a full 20% of the total build time, with no actual typescript files to compile.
When using the --verbose grunt option, there appears to be two large pauses, one right after "Verifying typescript.base exists in config...OK" and before "Files: [no src] -> app/generated/typescript". The second large pause occurs after "Options: target="es5", basePath="app/", sourceMap, comments, noImplicitAny" and before "Reading C:/etc/node_modules/grunt-typescript/node_modules/typescript/bin/lib.d.ts".
The task does not seem to work correctly when targeting a single js file. I was expecting the task to write to dist/all/app.js
as configured, but it doesn't appear to work. Notice that the verbose log shows that it read the configuration correctly (-> dist/all/app.js
), but still writes to the wrong file (File C:/dev/ng-boilerplate/about/about.js created.
).
Running "typescript:app" (typescript) task
Verifying property typescript.app exists in config...OK
Files: src/app/about/about.ts, src/app/app.ts, src/app/home/home.ts -> dist/all/app.js
Reading C:\dev\ng-boilerplate\node_modules\grunt-typescript\node_modules\typescript\bin\typescript.js...OK
Reading C:\dev\ng-boilerplate\node_modules\grunt-typescript\node_modules\typescript\bin\lib.d.ts...OK
Reading C:/dev/ng-boilerplate/src/app/about/about.ts...OK
Reading C:/dev/ng-boilerplate/vendor/DefinitelyTyped/angularjs/angular.d.ts...OK
Reading C:/dev/ng-boilerplate/vendor/DefinitelyTyped/jquery/jquery.d.ts...OK
Reading C:/dev/ng-boilerplate/src/app/app.ts...OK
Reading C:/dev/ng-boilerplate/src/app/home/home.ts...OK
Writing C:/dev/ng-boilerplate/about/about.js.map...OK
Writing C:/dev/ng-boilerplate/about/about.js...OK
Writing C:/dev/ng-boilerplate/app.js.map...OK
Writing C:/dev/ng-boilerplate/app.js...OK
Writing C:/dev/ng-boilerplate/home/home.js.map...OK
Writing C:/dev/ng-boilerplate/home/home.js...OK
File C:/dev/ng-boilerplate/about/about.js created.
js: 3 files, map: 3 files, declaration: 0 files
This is the equivalent PowerShell command line I would expect, which does do what I want:
tsc --out dist\app\all.js --sourcemap --target ES5 (dir -r src\app -i *.ts | select -expand fullname)
This plugin doesn't work with typescript 0.9.0 (currently alpha, will be released in a few weeks).
There have been significant rewrites to the typescript compiler, which result in dramatic changes to the typescript API/codebase making this plugin completely incompatible.
I suspect this may happen again in the future from 0.9.0 to 1.0.0 as well.
It might be better to just move to executing tsc from the shell?
I did not verify if this is failing only on Windows, but I guess so as nobody reported this :)
I get "Arguments to path.join must be strings error" with a basic setup and two trivial typescript files.
typescript: {
base: {
src: ['src/**/*.ts'],
dest: ['tmp'],
options: {
module: 'amd',
target: 'es5'
}
}
}
Platform:
Windows 8 x64
Node 0.10.2
Grunt v0.4.1
Hi,
I am new to all of the frontend stack so be indulgent.
I am trying to use grunt, typescript, angular, bower and require to do a project.
Almost everything is working.
The code generated have the require instrcution like this:
define(["require", "exports"], function (require, exports) {
/.../
});
This look like default behavior since I didn't configure anything other than the module and target (amd, es5).
Since I am using angular I figure out that I should manage it to look like this:
define(["require", "exports","angular"], function (require, exports, angular) {
/.../
});
But now I am stock... nothing seems to work I always get the "Cannot find external module" when compiling.
I trying a multiple version of import that look like this
/// <reference path="../../../../typings/angularjs/angular.d.ts" />
import angular = require("ng");
Nothing never work.
Also I was wondering if I need to have the same file/folder tree at the end result ? Tye typings directory in the example is below the root of the project so not acessible via the web, I have the angular library available via the config.json file for requirejs properly setup (with bower-requirejs).
What is missing ?
Thanks for the help !
Was the build task for this project removed? It looks like it depended on grunt-shell, which is also not present.
When I use options: {references: "…"}
, changes to those declaration files are not incorporated into compilation when my source files change. Take this example:
Gruntfile.js
:
…
watch: {
src: ['src/**/*.ts'],
options: {
noImplicitAny: true,
module: 'amd',
references: "typings/**/*.d.ts",
target: 'es5',
watch: true
}
}
…
src/simple.ts
:
var observer = window.MutationObserver || window.WebkitMutationObserver;
typings/lib.dom.es6.d.ts
:
interface Window {
MutationObserver?: MutationObserver;
WebkitMutationObserver?: MutationObserver;
}
At this point I run grunt typescript:watch
, and then save src/simple.ts
to trigger a compilation. It succeeds, so I make a change src/simple.ts
to:
var observer = window.MutationObserver || window.WebkitMutationObserver || window.MozMutationObserver;
At this point it fails compilation, complaining error TS2339: Property 'MozMutationObserver' does not exist on type 'Window'.
. So I update typings/lib.dom.es6.d.ts
to be:
interface Window {
MutationObserver?: MutationObserver;
WebkitMutationObserver?: MutationObserver;
MozMutationObserver?: MutationObserver;
}
I then save src/simple.ts
to trigger a compilation, but it fails with the same error. Only after restarting grunt does it compile correctly.
Running grunt-typescript in a gruntfile before grunt-tslint can cause problems with tslint. I've attached a simple project. Unzip, run npm install, and then run grunt. You will see that ts-lint fails will an incorrect error. If you then run "grunt works" grunt will instead use grunt-ts and grunt-tslint will no longer report an error.
I noticed that both grunt-typescript and tslint use the TypeScript compiler API so perhaps grunt-typescript is changing some sort of global setting that affects tslint?
https://www.dropbox.com/s/bx4rd61dv03h6mv/grunt-typescript-problem.zip?dl=0
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
0.4.1 seem to work fine, but the 0.4.2 compiles in an endless loop. It never finishes.
お疲れさまです。たびたび失礼します。
*.d.tsが入力されても無視されているようですが(497行)、何か理由があるのでしょうか?
コメントアウトしてみましたが、特に動作は問題ないようでした。
reference pathでd.tsの位置を解決するのがフォルダ構成上大変なので、入力を受け付けていただけると幸いです。
In my setup the node_modules folder is in a different location than the project itself. That means that and are different paths (in most setups they are equal). The output file is placed in /../xyz.js and not in /../xyz.js. Grunt base is correctly set to .
In my current workaround, I just removed the line where ioHost.currentPath() is used:
if (options.outputOne) {
//dest = _path.resolve(ioHost.currentPath(), dest);
settings.outFileOption = dest;
}
As Grunt knows the base path, the line should not be needed.
There is no bin/typescript.js file in 1.1, so the plugin fails when looking for that file.
Options should be strictly camel cased, keep supporting the old casing for the time being and recommend usage of the new variants.
Offenders at the moment are nolib
, sourcemap
and base_path
, renaming these to noLib
, sourceMap
and basePath
fits more with the culture and prior art with Grunt.
I'd love the watch functionality to be able to run in the background.
When I run grunt typescript
I get this error:
Error: ENOENT, no such file or directory /path/to/my/project/node_modules/grunt-typescript/tasks/../node_modules/typescript/bin/typescript.js
Obviously, it happens in the line:
var code = fs.readFileSync(__dirname + '/../node_modules/typescript/bin/typescript.js');
I was checking npm for TypeScript modules and noticed grunt-typescript didn't show-up in the keyword search. You could add the "typescript" keyword to the package.json.
There could be a way to specify a custom path to the compiler in this task, so we can build a project with a local development branch of typescript.
The 'src' option takes files to include:
typescript: {
base: {
src: ['path/to/typescript/files/**/*.ts'],
but it would be great to have a way to add a negative pattern to this.
For example, the above will compile all TypeScript files, but my project usually has *.d.ts definition files for other libraries I am using. I want to exclude all these files.
In other words, my primary use case for this feature would be telling TS to compile *.ts that isn't a *.d.ts file.
I have files that use reference's (like ///<reference path='../lib/MyType.ts' />
) that I want to compile into separate complete files.
But although the compiler correctly resolves those for type checking they are not concatenated in the output files. Instead the compiler output's the selected src files and the files they reference all separately.
I use these options:
options: {
module: 'commonjs',
target: 'es5',
base_path: 'test',
declaration: false,
sourcemap: true
},
src: ['test/**/*.spec.ts'],
dest: 'build/test/'
(I also tried removing base_path and module but it makes no difference)
I expected the referenced files to be included in the .js that match the names in the src selector, because otherwise I'd have to somehow import them again in javascript even though they were properly referenced in the typescript source.
This would be similar to when you concatenate multiple src files into a single dest file, in which case the references are included in the single output file.
日本語で失礼します。
Grunt 0.4 では、ファイル操作 API エコシステムの利便性が向上しているので、こちらに対応検討して頂けるとありがたいです。
例えば現状の以下のような指定を;
typescript: {
base: {
src: ['path/to/typescript/files/**/*.ts'],
dest: 'where/you/want/your/js/files'
}
}
以下のように書き換えられるようになり、glob によるパターンマッチの柔軟性が向上します:
typescript: {
base: {
expand: true,
cwd: 'path/to'
src: ['**/*.ts'],
dest: 'where/you/want/'
ext: '.ts'
}
}
上記指定ですと cwd
パス以下の src
で指定したマッチングパターンのファイルを dest
にディレクトリ階層をそのままにコンパイル済みのファイルを出力できます。拡張子も ext
で指定できます。
ご検討いただけたらさいわいです。
Running "typescript:core" (typescript) task
>> /Users/seandoig/code/project/lib/item.ts(75,13):
>> error TS2000: Duplicate identifier 'Item'.
File /Users/seandoig/code/project/item.js created.
js: 1 file, map: 1 file, declaration: 0 files
Running "typescript:specs" (typescript) task
>> /Users/seandoig/code/project/spec/itemSpec.ts(5,5):
>> error TS2011: Cannot convert 'number' to 'string'.
2 files created. js: 1 file, map: 1 file, declaration: 0 files
Running "typescript:specSupport" (typescript) task
2 files created. js: 1 file, map: 1 file, declaration: 0 files
Running "closureCompiler:minify" (closureCompiler) task
Executing: java -jar /usr/local/Cellar/closure-compiler/20130823/libexec/build/compiler.jar --js item.js --js_output_file=item.min.js
Command complete for target: minify
Done, without errors.
Running:
When a TypeScript file contains an error this is logged when building with grunt. But grunt is not told it is a real error so it continues with the other tasks and logs a successful build. See the attached screenshot.
I think commit 480910b is related.
Here is my grunt.js:
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-typescript');
grunt.initConfig({
typescript: {
base: {
src: ['**/*.ts'],
dest: 'test.js'
}
}
});
grunt.registerTask('default', ['typescript']);
};
The error:
TypeError: Object # has no method 'forEach'
at Object. (/Users/aaronshaf/Projects/acme/node_modules/grunt-typescript/tasks/typescript.js:180:20)
And yes, I have plenty of .ts files in the directory :)
See title. Errors are logged, but grunt still thinks that grunt-typescript finished successfully.
Hello,
is there an option for the compiler-switch emitComments. When not, could you implement it please?
Thanks!
Jan
04eb345
こちらのコミットでtypescript.jsからfindFileをコメントアウトしていますが、これで困るパターンがあったのでとりあえずご報告します。
何か別の意味があるのかもしれませんが、よくわからなかったので…。
https://gist.github.com/vvakame/5019579
こちらをclone して npm install && grunt を実行するとfindFileがなくて落ちるのが再現できます。
I have the following directory structure :
root
|
|_ package.json
|_ Gruntfile.js
|
|_ javascripts/
|_ ts/file.ts
In the Gruntfile I have this:
//Project Config
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
typescript: {
base: {
src: ['./javascripts/ts/*.ts'],
dest: './javascripts/'
}
}
});
I expect the js files to be in javascripts/
directory. However when I run grunt typescript
, it creates this weird directory structure:
root
|
|_ package.json
|_ Gruntfile.js
|
|_ javascripts/
|_ ts/file.ts
|_ javascripts/
|_ ts/
|_ file.js
I expect the compiled file.js
to appear in the original javascripts/
directory.
Why is it so?
npm update
or fresh npm install
Log:
Running "typescript:compile" (typescript) task
Warning: Object #<Object> has no method 'stripQuotes' Use --force to continue.
Aborted due to warnings.
I'm getting the following error:
Running "typescript:framework" (typescript) task
node_modules/typescript/scripts/processDiagnosticMessages.ts(1,1): error TS6053: File 'node_modules/typescript/src/compiler/sys.ts' not found.
Warning: Task "typescript:framework" failed.� Use --force to continue.
Here is my config:
typescript: {
framework: {
src: ['*/.ts'],
dest: 'build/typescript/',
options: {
ignoreError: true, // Files might be on disk but not in csproj
module: 'amd', //or commonjs
target: 'es5', //or es3
sourceMap: true,
declaration: true
}
}
},
Issue is that the TypeScript processDiagnosticMessages.ts file references a src folder which does not exist in my TypeScript install. Not sure whether this is an issue with TypeScript or how grunt-typescript is calling TypeScript. I do not have the source of TypeScript installed.
I'm using this to compile a TypeScript Canvas library, and I keep getting errors such as The property 'stroke' does not exist on value of type 'CanvasRenderingContext2D'.
. My configuration is
typescript: {
base: {
src: ['src/ts/*.ts'],
dest: 'src/js/'
},
options: {
target: 'es5'
}
}
Add support for noResolve option.
One scenario where this is useful when one wants to use tsc to transpile the supported ES6 subset, which is likely to keep growing.
I wanted to do some debugging in Chrome with sourcemaps but the sourcemap option doesn't output the correct relative path to .ts file when you compile to another folder:
I have a fork here that will test and demonstrate this:
https://github.com/Bartvds/grunt-typescript/tree/sourcemapbug
If you compare this grunt_typescript build to this tsc build you'll notice the tsc one has relative path back to the basic.ts
source while the grunt one doesn't.
There's a html in the demo folder that will debug correctly in Chrome with sourcemap debugging enabled and developer bar open.
I changed the test to reflect this bug and fail: notice the gruntfile now outputs the sourcemap test to a subfolder but the sourcemap.
There's also tests and demo's for my sourcemap_fullpath edit but looks like it's failing it's both it's tests also on the same issue. To do stuff with the fulpath file you'll need to grunt those with grunt build
to update with tsc's shell command.
I'm getting an a warning when compiling:
Warning: Cannot read property 'astIDString' of undefined Use --force to continue.
I've looked around but I cant seem to get much information on this.
Any idea what it is???
My Grunt File:
grunt.initConfig({
typescript: {
base: {
files: {
'Web/App/Src.js': 'Web/App/Src.ts',
'Web/App/Specs.js': 'Web/App/Specs.ts'
},
options: {
module: 'amd',
target: 'ES3',
sourcemap: false,
declaration: false
}
}
},
Some compiler options are not available (sourceRoot, useCaseSensitiveFileResolution, ..)
Could we set TypeScript.CompilationSettings directly, with a task option which merges over the result of createCompilationSettings()?
Hello, I have quite large project (see this Gruntfile) with 350+ Typescript files. On initial compilation, the resulting app.js
is generated correctly, but after detecting the change, the app.js
contains only one recompiled file.
I'd like to:
app.js
file using unchanged, cached JS files + the changed recompiled filesregards
Grzegorz Grzybek
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.