LoginSignup
2
2

More than 5 years have passed since last update.

TypescriptはGruntで管理しないほうがよい??

Posted at

もとからコンパイル速度が遅いだけだと思いますがjsにすると6000行越えくらいなソースだと6秒ほどかかってしまいます。
環境はmacbook air 2012でnvmのnode 0.10.21でtypescriptが0.9.1.1

grunt-typescript経由6秒

time grunt typescript:dev
Running "typescript:dev" (typescript) task
File dist/main.js created.
js: 1 file, map: 0 files, declaration: 0 files

Done, without errors.

real    0m5.759s
user    0m5.456s
sys 0m0.345s
time tsc ./src/main.ts -out ./dist/main.js -d
real    0m3.935s
user    0m3.668s
sys 0m0.209s

直接tscだと4秒

tscの-wコマンドでwatchして生成されたjsなどの後処理をgruntでするほうがいいような気がします。(常駐する分ちょっと早い気がします)

やっぱtypescript遅いですね、ほかに早くなる方法ないのかな。
それでもいままでメンテナンスできてないJSを書き換えていくのには便利だと思います。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2