##// END OF EJS Templates
added optional lint parameter, -Plint=true to enable all lint tasks
added optional lint parameter, -Plint=true to enable all lint tasks

File last commit:

r94:f8676ff23eda ts-plugin
r94:f8676ff23eda ts-plugin
Show More
build.gradle
255 lines | 5.0 KiB | text/x-groovy | GroovyLexer
cin
Move to org.implab.gradle-typescript
r87 plugins {
cin
working build and test for browser and node targets
r93 id "org.implab.gradle-typescript" version "1.0.1-rc3"
cin
Move to org.implab.gradle-typescript
r87 }
cin
generate package version from mercurial tags
r61 // если версия явно не заданы вычисляем ее из тэга ревизии v.{num}***
// результатом будет версия '{num}.{distance}' где distance - расстояние от
// текущей ревизии до ревизии с тэгом
cin
added markRelease task
r68 def tagDistance = 0;
cin
working build and test for browser and node targets
r93 ext {
packageName = "@$npmScope/$name"
cin
added optional lint parameter, -Plint=true to enable all lint tasks
r94 lint = project.hasProperty('lint') ? lint : false
cin
working build and test for browser and node targets
r93 }
cin
generate package version from mercurial tags
r61 if (!version) {
cin
added markRelease task
r68
cin
generate package version from mercurial tags
r61 def rev = ["hg", "log", "-r", ".", "--template", "{latesttag('re:^v') % '{tag}-{distance}'}"].execute().text.trim();
def tagVersion;
cin
added markRelease task
r68 def match = (rev =~ /^v(\d+\.\d+\.\d+).*-(\d+)$/);
cin
generate package version from mercurial tags
r61
if (match.size()) {
tagVersion = match[0][1];
tagDistance = match[0][2].toInteger();
} else {
throw new Exception("A version must be specied");
}
cin
added markRelease task
r68 version = tagVersion;
if (tagDistance > 0)
version++;
cin
generate package version from mercurial tags
r61 } else {
println "explicit version: $version";
}
if (hasProperty('versionSuffix') && versionSuffix) {
version += "-$versionSuffix"
cin
split @implab/core into a separate repository
r27 }
cin
repository reorganized
r0
cin
Move to org.implab.gradle-typescript
r87 sources {
cin
migrating tests to the new project structure
r89 amd {
cin
migrating to new project plugin 1.0.1-rc1...
r90 typings {
srcDir main.output.typingsDir
}
cin
migrating tests to the new project structure
r89 }
cjs {
cin
migrating to new project plugin 1.0.1-rc1...
r90 typings {
srcDir main.output.typingsDir
}
}
testAmd {
typings {
srcDir main.output.typingsDir
srcDir amd.output.typingsDir
srcDir test.output.typingsDir
}
}
testCjs {
typings {
srcDir main.output.typingsDir
srcDir cjs.output.typingsDir
srcDir test.output.typingsDir
}
cin
migrating tests to the new project structure
r89 }
cin
working on support commonjs modules format
r59 }
cin
Move to org.implab.gradle-typescript
r87 typescript {
compilerOptions {
types = []
cin
migrating tests to the new project structure
r89 declaration = true
cin
working on support commonjs modules format
r59 }
cin
Amd tests are passed
r91 tscCmd = "$projectDir/node_modules/.bin/tsc"
tsLintCmd = "$projectDir/node_modules/.bin/tslint"
esLintCmd = "$projectDir/node_modules/.bin/eslint"
cin
Move to org.implab.gradle-typescript
r87 npmCmd = "npm"
cin
working on support commonjs modules format
r59 }
cin
working on multiplaftorm support (node, browser)
r47
cin
added optional lint parameter, -Plint=true to enable all lint tasks
r94 tasks.matching{ it.name =~ /^configureTs/ }.configureEach {
dependsOn "prepare"
}
tasks.matching{ it.name =~ /^lint/ }.configureEach {
onlyIf { lint }
}
cin
working on build.gradle
r92 task prepare {
}
cin
working on multiplaftorm support (node, browser)
r47 task printVersion {
cin
working on build.gradle
r92 dependsOn prepare
cin
working on multi-platform support
r48 doLast {
cin
working on build.gradle
r92 println "version: ${-> version}";
println "tagDistance: ${-> tagDistance}";
println "packageName: ${-> packageName}";
println "target: ${-> typescript.compilerOptions.target}";
println "module: ${-> typescript.compilerOptions.module}";
cin
working on multi-platform support
r48 }
cin
working on multiplaftorm support (node, browser)
r47 }
cin
improved core/build.gradle script
r4 task clean {
cin
added optional lint parameter, -Plint=true to enable all lint tasks
r94 prepare.mustRunAfter it
cin
improved core/build.gradle script
r4 doLast {
delete buildDir
cin
working on support commonjs modules format
r59 }
}
cin
migrating to new project plugin 1.0.1-rc1
r88 npmPackMeta {
meta {
cin
migrating tests to the new project structure
r89 name = packageName
cin
Added support for commonjs module format, all tests are pass.
r60 }
}
cin
migrating to new project plugin 1.0.1-rc1...
r90
cin
working on build.gradle
r92 configureTsCjs {
cin
migrating to new project plugin 1.0.1-rc1...
r90 dependsOn sources.main.output
cin
working build and test for browser and node targets
r93 compilerOptions {
types += [ "node" ]
}
cin
migrating to new project plugin 1.0.1-rc1...
r90 }
configureTsAmd {
cin
working on build.gradle
r92 dependsOn sources.main.output
cin
migrating to new project plugin 1.0.1-rc1...
r90 compilerOptions {
types += [ "requirejs", "dojo-typings" ]
}
}
cin
Amd tests are passed
r91 test {
workingDir layout.buildDirectory.dir("test");
commandLine "node", "tests/index.js"
}
cin
working build and test for browser and node targets
r93 task assembleAmd {
dependsOn sources.amd.output
assemble.mustRunAfter it
doLast {
assemble {
from(sources.amd.output.compiledDir)
}
}
}
task assembleCjs {
dependsOn sources.cjs.output
assemble.mustRunAfter it
doLast {
assemble {
from(sources.cjs.output.compiledDir)
}
}
}
cin
working on build.gradle
r92 task assembleTestAmd {
cin
migrating to new project plugin 1.0.1-rc1...
r90 dependsOn sources.amd.output
dependsOn sources.testAmd.output
cin
working build and test for browser and node targets
r93 assembleTest.mustRunAfter it
cin
working on build.gradle
r92
doLast {
assembleTest {
from(sources.amd.output.compiledDir)
from(sources.testAmd.output.compiledDir)
}
}
}
cin
working build and test for browser and node targets
r93 task assembleTestCjs {
dependsOn sources.cjs.output
dependsOn sources.testCjs.output
assembleTest.mustRunAfter it
doLast {
assembleTest {
from(sources.cjs.output.compiledDir)
from(sources.testCjs.output.compiledDir)
}
}
cin
working on build.gradle
r92 }
cin
working build and test for browser and node targets
r93 task prepareTargetEs5 {
prepare.mustRunAfter it
cin
working on build.gradle
r92
doLast {
typescript {
compilerOptions {
target = "es5"
lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable"]
}
}
}
}
task prepareTargetEsNext {
cin
working build and test for browser and node targets
r93 prepare.mustRunAfter it
cin
working on build.gradle
r92 doLast {
typescript {
compilerOptions {
cin
working build and test for browser and node targets
r93 target = "es2017"
lib = ["es2017", "dom", "scripthost"]
cin
working on build.gradle
r92 }
}
}
}
task prepareNode {
dependsOn prepareTargetEsNext
cin
working build and test for browser and node targets
r93 prepare.mustRunAfter it
cin
working on build.gradle
r92 doLast {
typescript {
compilerOptions {
module = "commonjs"
}
}
}
}
task prepareBrowser {
dependsOn prepareTargetEs5
cin
working build and test for browser and node targets
r93 prepare.mustRunAfter it
cin
working on build.gradle
r92 doLast {
cin
working build and test for browser and node targets
r93 packageName = "@$npmScope/$project.name-amd"
cin
working on build.gradle
r92 typescript {
compilerOptions {
cin
working build and test for browser and node targets
r93 module = "amd"
cin
working on build.gradle
r92 }
}
}
}
cin
working build and test for browser and node targets
r93 task assembleBrowser {
dependsOn prepareBrowser, assembleAmd, assemble
}
task assembleNode {
dependsOn prepareNode, assembleCjs, assemble
}
task testBrowser {
dependsOn prepareBrowser, assembleTestAmd, test
}
task testNode {
dependsOn prepareNode, assembleTestCjs, test
cin
migrating to new project plugin 1.0.1-rc1...
r90 }