| @@ -58,23 +58,29 task beforeBuild { | |||
|
|
58 | 58 | def createSoursetTasks = { String name, String outDir -> |
|
|
59 | 59 | def setName = name.capitalize(); |
|
|
60 | 60 | |
|
|
61 |
def |
|
|
|
61 | def compileDir = "$buildDir/compile/$name" | |
|
|
62 | 62 | def declDir = "$typingsDir/$name" |
|
|
63 | 63 | def setDir = "$projectDir/src/$name" |
|
|
64 | def jsDir = outDir; | |
|
|
64 | 65 | |
|
|
65 | 66 | def beforeBuildTask = task "beforeBuild$setName"(dependsOn: beforeBuild) { |
|
|
66 | 67 | } |
|
|
67 | 68 | |
|
|
68 | 69 | def copyJsTask = task "copyJs$setName"(dependsOn: beforeBuildTask, type: Copy) { |
|
|
69 | 70 | from "$setDir/js" |
|
|
70 |
into |
|
|
|
71 | into jsDir | |
|
|
72 | } | |
|
|
73 | ||
|
|
74 | def lintJsTask = task "lintJs$setName"(dependsOn: beforeBuildTask, type: Exec) { | |
|
|
75 | inputs.dir("$setDir/js/").skipWhenEmpty(); | |
|
|
76 | commandLine "eslint", '--format', 'stylish', "$setDir/js/" | |
|
|
71 | 77 | } |
|
|
72 | 78 | |
|
|
73 | 79 | def compileTsTask = task "compileTs$setName"(dependsOn: beforeBuildTask, type: Exec) { |
|
|
74 | inputs.dir("$setDir/ts") | |
|
|
80 | inputs.dir("$setDir/ts").skipWhenEmpty() | |
|
|
75 | 81 | inputs.file("$srcDir/tsconfig.json") |
|
|
76 | 82 | inputs.file("$setDir/tsconfig.json") |
|
|
77 |
outputs.dir( |
|
|
|
83 | outputs.dir(compileDir) | |
|
|
78 | 84 | outputs.dir(declDir) |
|
|
79 | 85 | |
|
|
80 | 86 | commandLine 'node_modules/.bin/tsc', |
| @@ -82,7 +88,7 def createSoursetTasks = { String name, | |||
|
|
82 | 88 | '-t', target, |
|
|
83 | 89 | '-m', jsmodule, |
|
|
84 | 90 | '-d', |
|
|
85 |
'--outDir', |
|
|
|
91 | '--outDir', compileDir, | |
|
|
86 | 92 | '--declarationDir', declDir |
|
|
87 | 93 | |
|
|
88 | 94 | if (lib) |
| @@ -90,16 +96,26 def createSoursetTasks = { String name, | |||
|
|
90 | 96 | } |
|
|
91 | 97 | |
|
|
92 | 98 | def copyTsOutputTask = task "copyTsOutput$setName"(dependsOn: compileTsTask, type: Copy) { |
|
|
93 |
from |
|
|
|
94 |
into |
|
|
|
99 | from compileDir | |
|
|
100 | into jsDir | |
|
|
95 | 101 | } |
|
|
96 | 102 | |
|
|
97 | 103 | def copyTypingsTask = task "copyTypings$setName"(dependsOn: compileTsTask, type: Copy) { |
|
|
98 | 104 | from declDir |
|
|
105 | into jsDir | |
|
|
106 | } | |
|
|
107 | ||
|
|
108 | def copyResourcesTask = task "copyResources$setName"(dependsOn: beforeBuildTask, type: Copy) { | |
|
|
109 | from "$setDir/resources" | |
|
|
99 | 110 | into outDir |
|
|
100 | 111 | } |
|
|
101 | 112 | |
|
|
102 | task "build$setName"(dependsOn: [copyTypingsTask, copyTsOutputTask, copyJsTask]) { | |
|
|
113 | task "build$setName" { | |
|
|
114 | dependsOn copyTypingsTask, | |
|
|
115 | copyTsOutputTask, | |
|
|
116 | copyJsTask, | |
|
|
117 | copyResourcesTask, | |
|
|
118 | lintJsTask | |
|
|
103 | 119 | } |
|
|
104 | 120 | } |
|
|
105 | 121 | |
| @@ -4,7 +4,7 HISTORY | |||
|
|
4 | 4 | 1.2.0 |
|
|
5 | 5 | ----- |
|
|
6 | 6 | |
|
|
7 | Major rafactoring, moving to support browser (rjs) and server (cjs) environments. | |
|
|
7 | Major rafactoring, moving to support both browser (rjs) and server (cjs) environments. | |
|
|
8 | 8 | |
|
|
9 | 9 | - dependency injection container ported to typescript |
|
|
10 | 10 | - sources are split to several sets to provide the ability for the conditional build of the project. |
| @@ -90,7 +90,7 | |||
|
|
90 | 90 | }, |
|
|
91 | 91 | "duplexer": { |
|
|
92 | 92 | "version": "0.1.1", |
|
|
93 | "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", | |
|
|
93 | "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", | |
|
|
94 | 94 | "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", |
|
|
95 | 95 | "dev": true |
|
|
96 | 96 | }, |
| @@ -144,7 +144,7 | |||
|
|
144 | 144 | "dependencies": { |
|
|
145 | 145 | "tape": { |
|
|
146 | 146 | "version": "2.3.3", |
|
|
147 | "resolved": "http://registry.npmjs.org/tape/-/tape-2.3.3.tgz", | |
|
|
147 | "resolved": "https://registry.npmjs.org/tape/-/tape-2.3.3.tgz", | |
|
|
148 | 148 | "integrity": "sha1-Lnzgox3wn41oUWZKcYQuDKUFevc=", |
|
|
149 | 149 | "dev": true, |
|
|
150 | 150 | "requires": { |
| @@ -277,7 +277,7 | |||
|
|
277 | 277 | }, |
|
|
278 | 278 | "minimist": { |
|
|
279 | 279 | "version": "0.0.5", |
|
|
280 | "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", | |
|
|
280 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", | |
|
|
281 | 281 | "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=", |
|
|
282 | 282 | "dev": true |
|
|
283 | 283 | }, |
| @@ -316,7 +316,7 | |||
|
|
316 | 316 | }, |
|
|
317 | 317 | "readable-stream": { |
|
|
318 | 318 | "version": "1.1.14", |
|
|
319 | "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | |
|
|
319 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | |
|
|
320 | 320 | "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", |
|
|
321 | 321 | "dev": true, |
|
|
322 | 322 | "requires": { |
| @@ -369,7 +369,7 | |||
|
|
369 | 369 | }, |
|
|
370 | 370 | "string_decoder": { |
|
|
371 | 371 | "version": "0.10.31", |
|
|
372 | "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", | |
|
|
372 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", | |
|
|
373 | 373 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", |
|
|
374 | 374 | "dev": true |
|
|
375 | 375 | }, |
| @@ -432,7 +432,7 | |||
|
|
432 | 432 | }, |
|
|
433 | 433 | "through2": { |
|
|
434 | 434 | "version": "0.2.3", |
|
|
435 | "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", | |
|
|
435 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", | |
|
|
436 | 436 | "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", |
|
|
437 | 437 | "dev": true, |
|
|
438 | 438 | "requires": { |
| @@ -7,7 +7,7 | |||
|
|
7 | 7 | _destination : null, |
|
|
8 | 8 | _id : null, |
|
|
9 | 9 | |
|
|
10 |
constructor : function(session, destination |
|
|
|
10 | constructor : function(session, destination) { | |
|
|
11 | 11 | this._destination = destination; |
|
|
12 | 12 | this._session = session; |
|
|
13 | 13 | }, |
| @@ -35,7 +35,7 | |||
|
|
35 | 35 | return options; |
|
|
36 | 36 | }, |
|
|
37 | 37 | |
|
|
38 |
process : function( |
|
|
|
38 | process : function() { | |
|
|
39 | 39 | this.warn("Messages are not acceped by this client"); |
|
|
40 | 40 | }, |
|
|
41 | 41 | |
| @@ -76,19 +76,16 | |||
|
|
76 | 76 | }, |
|
|
77 | 77 | handleAs: 'json' |
|
|
78 | 78 | }) |
|
|
79 | .then( | |
|
|
80 |
|
|
|
|
81 | me | |
|
|
82 | .log( | |
|
|
79 | .then(function (id) { | |
|
|
80 | me.log( | |
|
|
83 | 81 |
|
|
|
84 | 82 |
|
|
|
85 | 83 |
|
|
|
86 | 84 |
|
|
|
87 | 85 |
|
|
|
88 | 86 |
|
|
|
89 |
|
|
|
|
90 |
|
|
|
|
91 | .warn( | |
|
|
87 | function () { | |
|
|
88 | me.warn( | |
|
|
92 | 89 |
|
|
|
93 | 90 |
|
|
|
94 | 91 |
|
General Comments 0
You need to be logged in to leave comments.
Login now
