|
|
plugins {
|
|
|
id "org.implab.gradle-typescript" version "1.3.1"
|
|
|
id "ivy-publish"
|
|
|
}
|
|
|
|
|
|
typescript {
|
|
|
compilerOptions {
|
|
|
lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable"]
|
|
|
//listFiles = true
|
|
|
declaration = true
|
|
|
strict = true
|
|
|
types = []
|
|
|
module = "amd"
|
|
|
it.target = "es5"
|
|
|
experimentalDecorators = true
|
|
|
jsx = "react"
|
|
|
jsxFactory = "createElement"
|
|
|
moduleResolution = "node"
|
|
|
// traceResolution = true
|
|
|
// baseUrl = "./"
|
|
|
// paths = [ "*": [ "$projectDir/src/typings/*" ] ]
|
|
|
// baseUrl = "$projectDir/src/typings"
|
|
|
// typeRoots = ["$projectDir/src/typings"]
|
|
|
}
|
|
|
|
|
|
tscCmd = "$projectDir/node_modules/.bin/tsc"
|
|
|
tsLintCmd = "$projectDir/node_modules/.bin/tslint"
|
|
|
esLintCmd = "$projectDir/node_modules/.bin/eslint"
|
|
|
}
|
|
|
|
|
|
configureTsMain {
|
|
|
compilerOptions {
|
|
|
types = ["requirejs"]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
npmPackMeta {
|
|
|
meta {
|
|
|
name = "@$npmScope/$project.name"
|
|
|
}
|
|
|
}
|
|
|
|
|
|
task npmPackTypings(type: Copy) {
|
|
|
dependsOn sources.main.output
|
|
|
|
|
|
npmPack.dependsOn it
|
|
|
|
|
|
from sources.main.output.typingsDir
|
|
|
into npm.packageDir
|
|
|
}
|
|
|
|
|
|
task printVersion {
|
|
|
doLast {
|
|
|
println "packageName: ${npmPackMeta.metadata.get().name}";
|
|
|
println "version: $version";
|
|
|
println "target: $typescript.compilerOptions.target";
|
|
|
println "module: $typescript.compilerOptions.module";
|
|
|
println "symbols: $symbols";
|
|
|
}
|
|
|
}
|