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