| @@ -0,0 +1,1 | |||
|
|
1 | import "./plan"; | |
| @@ -0,0 +1,7 | |||
|
|
1 | import "./ActivatableTests"; | |
|
|
2 | import "./TraceSourceTests"; | |
|
|
3 | import "./CancellationTests"; | |
|
|
4 | import "./ObservableTests"; | |
|
|
5 | import "./ContainerTests"; | |
|
|
6 | import "./SafeTests"; | |
|
|
7 | import "./TextTests"; | |
| @@ -1,194 +1,246 | |||
|
|
1 | 1 | plugins { |
|
|
2 |
id "org.implab.gradle-typescript" version "1.0.1-rc |
|
|
|
2 | id "org.implab.gradle-typescript" version "1.0.1-rc3" | |
|
|
3 | 3 | } |
|
|
4 | 4 | |
|
|
5 | 5 | // если версия явно не заданы вычисляем ее из тэга ревизии v.{num}*** |
|
|
6 | 6 | // результатом будет версия '{num}.{distance}' где distance - расстояние от |
|
|
7 | 7 | // текущей ревизии до ревизии с тэгом |
|
|
8 | 8 | def tagDistance = 0; |
|
|
9 | 9 | |
|
|
10 | ext { | |
|
|
11 | packageName = "@$npmScope/$name" | |
|
|
12 | } | |
|
|
13 | ||
|
|
10 | 14 | if (!version) { |
|
|
11 | 15 | |
|
|
12 | 16 | def rev = ["hg", "log", "-r", ".", "--template", "{latesttag('re:^v') % '{tag}-{distance}'}"].execute().text.trim(); |
|
|
13 | 17 | |
|
|
14 | 18 | def tagVersion; |
|
|
15 | 19 | |
|
|
16 | 20 | def match = (rev =~ /^v(\d+\.\d+\.\d+).*-(\d+)$/); |
|
|
17 | 21 | |
|
|
18 | 22 | if (match.size()) { |
|
|
19 | 23 | tagVersion = match[0][1]; |
|
|
20 | 24 | tagDistance = match[0][2].toInteger(); |
|
|
21 | 25 | } else { |
|
|
22 | 26 | throw new Exception("A version must be specied"); |
|
|
23 | 27 | } |
|
|
24 | 28 | |
|
|
25 | 29 | version = tagVersion; |
|
|
26 | 30 | |
|
|
27 | 31 | if (tagDistance > 0) |
|
|
28 | 32 | version++; |
|
|
29 | 33 | } else { |
|
|
30 | 34 | println "explicit version: $version"; |
|
|
31 | 35 | } |
|
|
32 | 36 | |
|
|
33 | 37 | if (hasProperty('versionSuffix') && versionSuffix) { |
|
|
34 | 38 | version += "-$versionSuffix" |
|
|
35 | 39 | } |
|
|
36 | 40 | |
|
|
37 | ext { | |
|
|
38 | packageName = "@$npmScope/$npmName" | |
|
|
39 | } | |
|
|
40 | ||
|
|
41 | 41 | sources { |
|
|
42 | 42 | amd { |
|
|
43 | 43 | typings { |
|
|
44 | 44 | srcDir main.output.typingsDir |
|
|
45 | 45 | } |
|
|
46 | 46 | } |
|
|
47 | 47 | |
|
|
48 | 48 | cjs { |
|
|
49 | 49 | typings { |
|
|
50 | 50 | srcDir main.output.typingsDir |
|
|
51 | 51 | } |
|
|
52 | 52 | } |
|
|
53 | 53 | |
|
|
54 | 54 | testAmd { |
|
|
55 | 55 | typings { |
|
|
56 | 56 | srcDir main.output.typingsDir |
|
|
57 | 57 | srcDir amd.output.typingsDir |
|
|
58 | 58 | srcDir test.output.typingsDir |
|
|
59 | 59 | } |
|
|
60 | 60 | } |
|
|
61 | 61 | |
|
|
62 | 62 | testCjs { |
|
|
63 | 63 | typings { |
|
|
64 | 64 | srcDir main.output.typingsDir |
|
|
65 | 65 | srcDir cjs.output.typingsDir |
|
|
66 | 66 | srcDir test.output.typingsDir |
|
|
67 | 67 | } |
|
|
68 | 68 | } |
|
|
69 | 69 | } |
|
|
70 | 70 | |
|
|
71 | 71 | typescript { |
|
|
72 | 72 | compilerOptions { |
|
|
73 | 73 | types = [] |
|
|
74 | 74 | declaration = true |
|
|
75 | 75 | listFiles = true |
|
|
76 | 76 | } |
|
|
77 | 77 | tscCmd = "$projectDir/node_modules/.bin/tsc" |
|
|
78 | 78 | tsLintCmd = "$projectDir/node_modules/.bin/tslint" |
|
|
79 | 79 | esLintCmd = "$projectDir/node_modules/.bin/eslint" |
|
|
80 | 80 | npmCmd = "npm" |
|
|
81 | 81 | } |
|
|
82 | 82 | |
|
|
83 | 83 | task prepare { |
|
|
84 | 84 | |
|
|
85 | 85 | } |
|
|
86 | 86 | |
|
|
87 | 87 | task printVersion { |
|
|
88 | 88 | dependsOn prepare |
|
|
89 | 89 | |
|
|
90 | 90 | doLast { |
|
|
91 | 91 | println "version: ${-> version}"; |
|
|
92 | 92 | println "tagDistance: ${-> tagDistance}"; |
|
|
93 | 93 | println "packageName: ${-> packageName}"; |
|
|
94 | 94 | println "target: ${-> typescript.compilerOptions.target}"; |
|
|
95 | 95 | println "module: ${-> typescript.compilerOptions.module}"; |
|
|
96 | 96 | } |
|
|
97 | 97 | } |
|
|
98 | 98 | |
|
|
99 | 99 | task clean { |
|
|
100 | 100 | doLast { |
|
|
101 | 101 | delete buildDir |
|
|
102 | 102 | } |
|
|
103 | 103 | } |
|
|
104 | 104 | |
|
|
105 | 105 | npmPackMeta { |
|
|
106 | 106 | meta { |
|
|
107 | 107 | name = packageName |
|
|
108 | 108 | } |
|
|
109 | 109 | } |
|
|
110 | 110 | |
|
|
111 | 111 | configureTsCjs { |
|
|
112 | 112 | dependsOn sources.main.output |
|
|
113 | compilerOptions { | |
|
|
114 | types += [ "node" ] | |
|
|
115 | } | |
|
|
113 | 116 | } |
|
|
114 | 117 | |
|
|
115 | 118 | configureTsAmd { |
|
|
116 | 119 | dependsOn sources.main.output |
|
|
117 | 120 | compilerOptions { |
|
|
118 | 121 | types += [ "requirejs", "dojo-typings" ] |
|
|
119 | 122 | } |
|
|
120 | 123 | } |
|
|
121 | 124 | |
|
|
122 | 125 | test { |
|
|
123 | 126 | workingDir layout.buildDirectory.dir("test"); |
|
|
124 | 127 | commandLine "node", "tests/index.js" |
|
|
125 | 128 | } |
|
|
126 | 129 | |
|
|
130 | task assembleAmd { | |
|
|
131 | dependsOn sources.amd.output | |
|
|
132 | assemble.mustRunAfter it | |
|
|
133 | ||
|
|
134 | doLast { | |
|
|
135 | assemble { | |
|
|
136 | from(sources.amd.output.compiledDir) | |
|
|
137 | } | |
|
|
138 | } | |
|
|
139 | } | |
|
|
140 | ||
|
|
141 | task assembleCjs { | |
|
|
142 | dependsOn sources.cjs.output | |
|
|
143 | assemble.mustRunAfter it | |
|
|
144 | ||
|
|
145 | doLast { | |
|
|
146 | assemble { | |
|
|
147 | from(sources.cjs.output.compiledDir) | |
|
|
148 | } | |
|
|
149 | } | |
|
|
150 | } | |
|
|
151 | ||
|
|
127 | 152 | task assembleTestAmd { |
|
|
128 | 153 | dependsOn sources.amd.output |
|
|
129 | 154 | dependsOn sources.testAmd.output |
|
|
155 | assembleTest.mustRunAfter it | |
|
|
130 | 156 | |
|
|
131 | 157 | doLast { |
|
|
132 | 158 | assembleTest { |
|
|
133 | 159 | from(sources.amd.output.compiledDir) |
|
|
134 | 160 | from(sources.testAmd.output.compiledDir) |
|
|
135 | 161 | } |
|
|
136 | 162 | } |
|
|
137 | 163 | } |
|
|
138 | 164 | |
|
|
139 | assembleTest { | |
|
|
140 | mustRunAfter assembleTestAmd | |
|
|
141 |
dependsOn sources. |
|
|
|
142 | from(sources.main.output.compiledDir) | |
|
|
165 | task assembleTestCjs { | |
|
|
166 | dependsOn sources.cjs.output | |
|
|
167 | dependsOn sources.testCjs.output | |
|
|
168 | assembleTest.mustRunAfter it | |
|
|
169 | ||
|
|
170 | doLast { | |
|
|
171 | assembleTest { | |
|
|
172 | from(sources.cjs.output.compiledDir) | |
|
|
173 | from(sources.testCjs.output.compiledDir) | |
|
|
174 | } | |
|
|
175 | } | |
|
|
143 | 176 | } |
|
|
144 | 177 | |
|
|
145 | ||
|
|
178 | task prepareTargetEs5 { | |
|
|
179 | prepare.mustRunAfter it | |
|
|
146 | 180 | |
|
|
147 | task prepareTargetEs5 { | |
|
|
148 | 181 | doLast { |
|
|
149 | 182 | typescript { |
|
|
150 | 183 | compilerOptions { |
|
|
151 | 184 | target = "es5" |
|
|
152 | 185 | lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable"] |
|
|
153 | 186 | } |
|
|
154 | 187 | } |
|
|
155 | 188 | } |
|
|
156 | 189 | } |
|
|
157 | 190 | |
|
|
158 | 191 | task prepareTargetEsNext { |
|
|
192 | prepare.mustRunAfter it | |
|
|
193 | ||
|
|
159 | 194 | doLast { |
|
|
160 | 195 | typescript { |
|
|
161 | 196 | compilerOptions { |
|
|
162 |
target = "es |
|
|
|
163 |
lib = ["es |
|
|
|
197 | target = "es2017" | |
|
|
198 | lib = ["es2017", "dom", "scripthost"] | |
|
|
164 | 199 | } |
|
|
165 | 200 | } |
|
|
166 | 201 | } |
|
|
167 | 202 | } |
|
|
168 | 203 | |
|
|
169 | 204 | task prepareNode { |
|
|
170 | 205 | dependsOn prepareTargetEsNext |
|
|
206 | prepare.mustRunAfter it | |
|
|
207 | ||
|
|
171 | 208 | doLast { |
|
|
172 | 209 | typescript { |
|
|
173 | 210 | compilerOptions { |
|
|
174 | target = "esnext" | |
|
|
175 | 211 | module = "commonjs" |
|
|
176 | 212 | } |
|
|
177 | 213 | } |
|
|
178 | 214 | } |
|
|
179 | 215 | } |
|
|
180 | 216 | |
|
|
181 | 217 | task prepareBrowser { |
|
|
182 | 218 | dependsOn prepareTargetEs5 |
|
|
219 | prepare.mustRunAfter it | |
|
|
220 | ||
|
|
183 | 221 | doLast { |
|
|
222 | packageName = "@$npmScope/$project.name-amd" | |
|
|
223 | ||
|
|
184 | 224 | typescript { |
|
|
185 | 225 | compilerOptions { |
|
|
186 |
module = " |
|
|
|
226 | module = "amd" | |
|
|
187 | 227 | } |
|
|
188 | 228 | } |
|
|
189 | 229 | } |
|
|
190 | 230 | } |
|
|
191 | 231 | |
|
|
192 | prepare { | |
|
|
193 | mustRunAfter prepareNode, prepareBrowser | |
|
|
232 | task assembleBrowser { | |
|
|
233 | dependsOn prepareBrowser, assembleAmd, assemble | |
|
|
234 | } | |
|
|
235 | ||
|
|
236 | task assembleNode { | |
|
|
237 | dependsOn prepareNode, assembleCjs, assemble | |
|
|
238 | } | |
|
|
239 | ||
|
|
240 | task testBrowser { | |
|
|
241 | dependsOn prepareBrowser, assembleTestAmd, test | |
|
|
242 | } | |
|
|
243 | ||
|
|
244 | task testNode { | |
|
|
245 | dependsOn prepareNode, assembleTestCjs, test | |
|
|
194 | 246 | } No newline at end of file |
| @@ -1,7 +1,6 | |||
|
|
1 | 1 | version= |
|
|
2 | 2 | author=Implab team |
|
|
3 | 3 | description=Dependency injection, logging, simple and fast text template engine |
|
|
4 | 4 | license=BSD-2-Clause |
|
|
5 | 5 | repository=https://bitbucket.org/implab/implabjs-core |
|
|
6 |
npmScope=implab |
|
|
|
7 | npmName=core-amd No newline at end of file | |
|
|
6 | npmScope=implab No newline at end of file | |
| @@ -1,35 +1,34 | |||
|
|
1 | 1 | { |
|
|
2 | 2 | "name": "@implab/core", |
|
|
3 | 3 | "version": "0.0.1-dev", |
|
|
4 | 4 | "description": "Dependency injection, logging, simple and fast text template engine", |
|
|
5 | 5 | "main": "main.js", |
|
|
6 | 6 | "keywords": [ |
|
|
7 | 7 | "di", |
|
|
8 | 8 | "ioc", |
|
|
9 | 9 | "logging", |
|
|
10 | 10 | "template engine", |
|
|
11 | 11 | "dependency injection" |
|
|
12 | 12 | ], |
|
|
13 | 13 | "author": "Implab team", |
|
|
14 | 14 | "license": "BSD-2-Clause", |
|
|
15 | 15 | "repository": "https://bitbucket.org/implab/implabjs", |
|
|
16 | 16 | "publishConfig": { |
|
|
17 | 17 | "access": "public" |
|
|
18 | 18 | }, |
|
|
19 | 19 | "peerDependencies": { |
|
|
20 | 20 | "dojo": "^1.10.0" |
|
|
21 | 21 | }, |
|
|
22 | 22 | "devDependencies": { |
|
|
23 | 23 | "@types/node": "^8.0.0", |
|
|
24 | 24 | "@types/requirejs": "~2.1.31", |
|
|
25 | 25 | "@types/tape": "~4.2.33", |
|
|
26 | 26 | "dojo": "~1.10.0", |
|
|
27 | 27 | "dojo-typings": "^1.11.9", |
|
|
28 | 28 | "requirejs": "latest", |
|
|
29 | 29 | "tape": "~4.11.0", |
|
|
30 | 30 | "typescript": "~3.6.4", |
|
|
31 | 31 | "eslint": "6.1.0", |
|
|
32 | 32 | "tslint": "5.18.0" |
|
|
33 |
} |
|
|
|
34 | "types": "main.d.ts" | |
|
|
33 | } | |
|
|
35 | 34 | } |
| @@ -1,16 +1,14 | |||
|
|
1 | 1 | { |
|
|
2 | 2 | "extends": "../tsconfig", |
|
|
3 | 3 | "compilerOptions": { |
|
|
4 | 4 | "types": [ |
|
|
5 | "requirejs" | |
|
|
5 | "requirejs", | |
|
|
6 | "dojo-typings" | |
|
|
6 | 7 | ], |
|
|
7 | 8 | "rootDir": "ts", |
|
|
8 | 9 | "rootDirs": [ |
|
|
9 | 10 | "ts", |
|
|
10 |
"../ |
|
|
|
11 | "../main/ts" | |
|
|
11 | 12 | ] |
|
|
12 |
} |
|
|
|
13 | "include": [ | |
|
|
14 | "ts/**/*.ts" | |
|
|
15 | ] | |
|
|
13 | } | |
|
|
16 | 14 | } No newline at end of file |
| @@ -1,9 +1,9 | |||
|
|
1 | 1 | { |
|
|
2 | 2 | "compilerOptions": { |
|
|
3 | 3 | "moduleResolution": "node", |
|
|
4 | 4 | "noEmitOnError": true, |
|
|
5 | 5 | "listFiles": true, |
|
|
6 | 6 | "types": [], |
|
|
7 | "lib": ["es5", "es2015.promise", "es2015.symbol", "dom", "scripthost"] | |
|
|
7 | "lib": ["es5", "es2015.promise", "es2015.symbol", "es2015.iterable", "dom", "scripthost"] | |
|
|
8 | 8 | } |
|
|
9 | 9 | } No newline at end of file |
|
|
1 | NO CONTENT: file was removed |
|
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now
