| @@ -53,7 +53,7 typescript { | |||||
| 53 | types = [] |
|
53 | types = [] | |
| 54 | declaration = true |
|
54 | declaration = true | |
| 55 | sourceMap = true |
|
55 | sourceMap = true | |
| 56 |
sourceRoot = " |
|
56 | sourceRoot = "_src" | |
| 57 | } |
|
57 | } | |
| 58 | tscCmd = "$projectDir/node_modules/.bin/tsc" |
|
58 | tscCmd = "$projectDir/node_modules/.bin/tsc" | |
| 59 | tsLintCmd = "$projectDir/node_modules/.bin/tslint" |
|
59 | tsLintCmd = "$projectDir/node_modules/.bin/tslint" | |
| @@ -118,17 +118,37 test { | |||||
| 118 | } |
|
118 | } | |
| 119 |
|
119 | |||
| 120 | assemble { |
|
120 | assemble { | |
|
|
121 | mustRunAfter sources.amd.output, | |||
|
|
122 | sources.cjs.output | |||
|
|
123 | ||||
| 121 | from sources.amd.output.compiledDir |
|
124 | from sources.amd.output.compiledDir | |
| 122 | from sources.cjs.output.compiledDir |
|
125 | from sources.cjs.output.compiledDir | |
| 123 | } |
|
126 | } | |
| 124 |
|
127 | |||
| 125 | assembleTest { |
|
128 | assembleTest { | |
|
|
129 | mustRunAfter sources.amd.output, | |||
|
|
130 | sources.cjs.output, | |||
|
|
131 | sources.testAmd.output, | |||
|
|
132 | sources.testCjs.output | |||
|
|
133 | ||||
| 126 | from sources.amd.output.compiledDir |
|
134 | from sources.amd.output.compiledDir | |
| 127 | from sources.cjs.output.compiledDir |
|
135 | from sources.cjs.output.compiledDir | |
| 128 | from sources.testAmd.output.compiledDir |
|
136 | from sources.testAmd.output.compiledDir | |
| 129 | from sources.testCjs.output.compiledDir |
|
137 | from sources.testCjs.output.compiledDir | |
| 130 | } |
|
138 | } | |
| 131 |
|
139 | |||
|
|
140 | task prepareLocalDebug { | |||
|
|
141 | prepare.mustRunAfter it | |||
|
|
142 | ||||
|
|
143 | doLast { | |||
|
|
144 | tasks.matching{ it.name =~ /^configureTs/ }.configureEach { | |||
|
|
145 | compilerOptions { | |||
|
|
146 | sourceRoot = "file://" + it.rootDir | |||
|
|
147 | } | |||
|
|
148 | } | |||
|
|
149 | } | |||
|
|
150 | } | |||
|
|
151 | ||||
| 132 | task prepareNode { |
|
152 | task prepareNode { | |
| 133 | prepare.mustRunAfter it |
|
153 | prepare.mustRunAfter it | |
| 134 |
|
154 | |||
| @@ -176,7 +196,7 task npmPackSourcesAmd(type: Copy) { | |||||
| 176 |
|
196 | |||
| 177 | npmPack.mustRunAfter it |
|
197 | npmPack.mustRunAfter it | |
| 178 |
|
198 | |||
| 179 | into "${->buildDir}/npm/pack" |
|
199 | into "${->buildDir}/npm/pack/_src" | |
| 180 | } |
|
200 | } | |
| 181 |
|
201 | |||
| 182 | task assembleBrowser { |
|
202 | task assembleBrowser { | |
| @@ -187,6 +207,10 task assembleNode { | |||||
| 187 | dependsOn prepareNode, assemble, sources.cjs.output |
|
207 | dependsOn prepareNode, assemble, sources.cjs.output | |
| 188 | } |
|
208 | } | |
| 189 |
|
209 | |||
|
|
210 | task assembleTestBrowser { | |||
|
|
211 | dependsOn prepareBrowser, prepareLocalDebug, assembleTest, sources.amd.output, sources.testAmd.output | |||
|
|
212 | } | |||
|
|
213 | ||||
| 190 | task testBrowser { |
|
214 | task testBrowser { | |
| 191 | dependsOn prepareBrowser, test, sources.amd.output, sources.testAmd.output |
|
215 | dependsOn prepareBrowser, test, sources.amd.output, sources.testAmd.output | |
| 192 | } |
|
216 | } | |
General Comments 0
You need to be logged in to leave comments.
Login now
