##// END OF EJS Templates
almost woking typings
almost woking typings

File last commit:

r1:a51ea59f0423 default
r9:988f0f6aab67 default
Show More
build.gradle
70 lines | 1.7 KiB | text/x-groovy | GroovyLexer
cin
initial commit
r0 plugins {
id "org.implab.gradle-typescript" version "1.3.4"
id "org.implab.gradle-mercurial" version "1.0.1"
}
if (!symbols in ['local', 'pack', 'none'])
throw new Exception("The symbols property value is invalid: $symbols");
if (!flavour in ['browser', 'node'])
throw new Exception("The flavour property value is invalid: $flavour");
ext {
packageName = flavour == 'browser' ? "@$npmScope/$name-amd" : "@$npmScope/$name"
lint = project.hasProperty('lint') ? project.lint ?: true : false
}
mercurial {
preReleasePolicy { it
.addPatch(versionDistance)
.withPreRelease('dev')
.withMeta(changeset)
}
applyVersioningPolicy()
}
typescript {
compilerOptions {
types = []
declaration = true
experimentalDecorators = true
strict = true
cin
working on fluent configuration
r1 module = "commonjs"
target = "es5"
lib = ["es2015", "dom", "scripthost"]
cin
initial commit
r0 }
tscCmd = "$projectDir/node_modules/.bin/tsc"
tsLintCmd = "$projectDir/node_modules/.bin/tslint"
esLintCmd = "$projectDir/node_modules/.bin/eslint"
}
tasks.matching{ it.name =~ /^lint/ }.configureEach {
onlyIf { lint }
}
if (symbols == 'local') {
tasks.matching{ it.name =~ /^configureTs/ }.configureEach {
compilerOptions {
sourceRoot = "file://" + it.rootDir
}
}
}
cin
working on fluent configuration
r1 task packSources {
}
cin
initial commit
r0 printVersion {
doLast {
println "packageName: $packageName";
println "flavour: $flavour";
println "target: $typescript.compilerOptions.target";
println "module: $typescript.compilerOptions.module";
println "lint: $lint";
println "symbols: $symbols";
}
}
cin
working on fluent configuration
r1
test {
commandLine "npx", "mocha", "${->typescript.testDir.get()}";
}