Skip to content

Instantly share code, notes, and snippets.

@hdeshev
Created September 22, 2015 16:55
Show Gist options
  • Save hdeshev/fc54ced365c01a67dd67 to your computer and use it in GitHub Desktop.
Save hdeshev/fc54ced365c01a67dd67 to your computer and use it in GitHub Desktop.

Revisions

  1. hdeshev created this gist Sep 22, 2015.
    16 changes: 16 additions & 0 deletions build.ninja
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    ninja_required_version = 1.6
    tsflags = --module commonjs --noEmitOnError --noImplicitAny --emitDecoratorMetadata --experimentalDecorators --target es5
    rule tsc
    command = ./node_modules/.bin/tsc $tsflags "$in" && node build/getrefs.js "$in" "$out" "$in.dep"
    description = TypeScript compile: $in
    depfile = "$in.dep"
    deps = gcc
    rule dts
    command = touch "$out"
    description = TypeScript declarations: $in
    build .ninja_dts/department.d.ts.build: dts src/department.d.ts
    build .ninja_dts/person.d.ts.build: dts src/person.d.ts
    build src/department-api.js: tsc src/department-api.ts
    build src/department.js: tsc src/department.ts
    build src/person-api.js: tsc src/person-api.ts
    build src/person.js: tsc src/person.ts