##// END OF EJS Templates
added properties to the build project...
added properties to the build project flavour=(browser|node) controls the target runtime settings symbols=(none|local|pack) controls how the source maps are generated and sources are packed

File last commit:

r99:7071c0e728fe ts-plugin
r99:7071c0e728fe ts-plugin
Show More
build.gradle
224 lines | 4.7 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
build.gradle cleanup and refactoring
r97 id "org.implab.gradle-hg"
cin
working on publications
r95 id "ivy-publish"
cin
Move to org.implab.gradle-typescript
r87 }
cin
added properties to the build project...
r99 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");
cin
added markRelease task
r68
cin
working build and test for browser and node targets
r93 ext {
cin
added properties to the build project...
r99 packageName = flavour == 'browser' ? "@$npmScope/$name-amd" : "@$npmScope/$name"
lint = project.hasProperty('lint') ? project.lint : false
cin
working on publications
r95 }
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
added properties to the build project...
r99
if(symbols != 'none') {
sourceMap = true
sourceRoot = "_src"
}
if (flavour == 'node') {
module = "commonjs"
target = "es2017"
lib = ["es2017", "dom", "scripthost"]
} else if (flavour == 'browser') {
module = "amd"
target = "es5"
lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable" ]
}
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 =~ /^lint/ }.configureEach {
onlyIf { lint }
}
cin
added properties to the build project...
r99 if (symbols == 'local') {
tasks.matching{ it.name =~ /^configureTs/ }.configureEach {
compilerOptions {
sourceRoot = "file://" + it.rootDir
}
}
cin
working on build.gradle
r92 }
cin
working on multiplaftorm support (node, browser)
r47 task printVersion {
cin
working on multi-platform support
r48 doLast {
cin
added properties to the build project...
r99 println "packageName: ${-> packageName}";
cin
working on build.gradle
r92 println "version: ${-> version}";
cin
added properties to the build project...
r99 println "flavour: ${-> flavour}";
cin
working on build.gradle
r92 println "target: ${-> typescript.compilerOptions.target}";
println "module: ${-> typescript.compilerOptions.module}";
cin
added properties to the build project...
r99 println "lint: ${-> lint}";
println "symbols: ${-> symbols}";
cin
working on multi-platform support
r48 }
cin
working on multiplaftorm support (node, browser)
r47 }
cin
improved core/build.gradle script
r4 task clean {
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
build.gradle cleanup and refactoring
r97 assemble {
cin
added properties to the build project...
r99 if (flavour == 'browser') {
dependsOn sources.amd.output
from sources.amd.output.compiledDir
}
if (flavour == 'node') {
dependsOn sources.cjs.output
from sources.cjs.output.compiledDir
cin
Working on build, vs code tasks
r98 }
}
cin
added properties to the build project...
r99 assembleTest {
if (flavour == 'browser') {
dependsOn sources.amd.output, sources.testAmd.output
cin
working on build.gradle
r92
cin
added properties to the build project...
r99 from sources.amd.output.compiledDir
from sources.testAmd.output.compiledDir
}
if (flavour == 'node') {
dependsOn sources.cjs.output, sources.testCjs.output
from sources.cjs.output.compiledDir
from sources.testCjs.output.compiledDir
cin
working on build.gradle
r92 }
}
cin
added properties to the build project...
r99 task npmPackTypings(type: Copy) {
npmPack.dependsOn it
dependsOn sources.main.output
from sources.main.output.typingsDir
cin
working build and test for browser and node targets
r93
cin
added properties to the build project...
r99 if (flavour == 'browser') {
dependsOn sources.amd.output
from sources.amd.output.typingsDir
cin
working on build.gradle
r92 }
cin
added properties to the build project...
r99 if (flavour == 'node') {
dependsOn sources.cjs.output
from sources.cjs.output.typingsDir
}
cin
added tasks to pack typings and sources to npm packages
r96
into "${->buildDir}/npm/pack"
}
cin
added properties to the build project...
r99 task npmPackSources(type: Copy) {
cin
added tasks to pack typings and sources to npm packages
r96 from sources.main.ts
cin
added properties to the build project...
r99
if (flavour == 'browser') {
from sources.amd.ts
}
if (flavour == 'node') {
from sources.cjs.ts
}
cin
added tasks to pack typings and sources to npm packages
r96
cin
Working on build, vs code tasks
r98 into "${->buildDir}/npm/pack/_src"
cin
added tasks to pack typings and sources to npm packages
r96 }
cin
added properties to the build project...
r99 if (symbols == 'pack') {
npmPack {
dependsOn npmPackSources
}
cin
Working on build, vs code tasks
r98 }
cin
working on publications
r95 task packJsTar(type: Tar) {
dependsOn assemble;
archiveBaseName = provider { packageName }
destinationDirectory = buildDir
archiveClassifier = provider { typescript.compilerOptions.module }
compression = Compression.GZIP
from(assemble.outputs)
doLast {
println archiveName;
}
}
cin
added tasks to pack typings and sources to npm packages
r96 task packTypingsTar(type: Tar) {
}
cin
working on publications
r95 publishing {
publications {
local(IvyPublication) {
artifact(packJsTar) {
type = "js"
}
}
}
repositories {
ivy {
url "ivy-repo"
}
}
cin
migrating to new project plugin 1.0.1-rc1...
r90 }