build.gradle
72 lines
| 1.9 KiB
| text/x-groovy
|
GroovyLexer
|
|
r0 | plugins { | |
|
|
r8 | id "org.implab.gradle-typescript" version "1.3.3" | |
|
|
r0 | id "ivy-publish" | |
| } | |||
| typescript { | |||
| compilerOptions { | |||
| lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable"] | |||
|
|
r2 | //listFiles = true | |
|
|
r0 | declaration = true | |
|
|
r1 | strict = true | |
|
|
r0 | types = [] | |
| module = "amd" | |||
| it.target = "es5" | |||
| experimentalDecorators = true | |||
| jsx = "react" | |||
| jsxFactory = "createElement" | |||
| moduleResolution = "node" | |||
|
|
r4 | // dojo-typings are sick | |
| skipLibCheck = true | |||
|
|
r2 | // traceResolution = true | |
| // baseUrl = "./" | |||
| // paths = [ "*": [ "$projectDir/src/typings/*" ] ] | |||
| // baseUrl = "$projectDir/src/typings" | |||
| // typeRoots = ["$projectDir/src/typings"] | |||
|
|
r0 | } | |
| tscCmd = "$projectDir/node_modules/.bin/tsc" | |||
| tsLintCmd = "$projectDir/node_modules/.bin/tslint" | |||
| esLintCmd = "$projectDir/node_modules/.bin/eslint" | |||
| } | |||
| configureTsMain { | |||
| compilerOptions { | |||
|
|
r4 | types = ["requirejs", "dojo-typings"] | |
|
|
r2 | } | |
| } | |||
|
|
r8 | configureTsTest { | |
| compilerOptions { | |||
| baseUrl = "." | |||
| paths = [ | |||
| "@implab/djx" : [ sources.main.output.typingsDir.get().toString() ], | |||
| "@implab/djx/*" : [ "${sources.main.output.typingsDir.get().toString()}/*" ] | |||
| ] | |||
| types = ["requirejs", sources.main.output.typingsDir.get().toString()] | |||
| } | |||
| } | |||
|
|
r2 | npmPackMeta { | |
| meta { | |||
| name = "@$npmScope/$project.name" | |||
|
|
r0 | } | |
| } | |||
|
|
r2 | task npmPackTypings(type: Copy) { | |
|
|
r7 | dependsOn typings | |
|
|
r2 | ||
|
|
r6 | npmPackContents.dependsOn it | |
|
|
r2 | ||
|
|
r7 | from typescript.typingsDir | |
|
|
r2 | into npm.packageDir | |
| } | |||
|
|
r0 | task printVersion { | |
| doLast { | |||
|
|
r2 | println "packageName: ${npmPackMeta.metadata.get().name}"; | |
|
|
r0 | println "version: $version"; | |
| println "target: $typescript.compilerOptions.target"; | |||
| println "module: $typescript.compilerOptions.module"; | |||
| println "symbols: $symbols"; | |||
| } | |||
| } |
