##// END OF EJS Templates
working on multiplaftorm support (node, browser)
cin -
r47:4a34b9d6df70 di-typescript
parent child
Show More
@@ -0,0 +1,23
1 {
2 "name": "${packageName}",
3 "version": "${verstion}",
4 "description": "${description}",
5 "main": "main.js",
6 "keywords": [
7 "di",
8 "ioc",
9 "logging",
10 "template engine",
11 "dependency injection"
12 ],
13 "author": "${author}",
14 "license": "${license}",
15 "repository": "$repository",
16 "publishConfig": {
17 "access": "public"
18 },
19 "peerDependencies": {
20 "dojo": "^1.10.0"
21 }
22 }
23 No newline at end of file
@@ -0,0 +1,16
1 {
2 "compilerOptions": {
3 "target": "es3",
4 "module": "amd",
5 "sourceMap": true,
6 "declaration": true,
7 "lib": [
8 "es5",
9 "es2015.promise",
10 "es2015.symbol"
11 ]
12 },
13 "include" : [
14 "ts/**/*.ts"
15 ]
16 } No newline at end of file
@@ -0,0 +1,14
1 {
2 "compilerOptions": {
3 "target": "es3",
4 "module": "amd",
5 "sourceMap": true,
6 "moduleResolution": "node",
7 "lib": [
8 "es2015"
9 ]
10 },
11 "include" : [
12 "ts/**/*.ts"
13 ]
14 } No newline at end of file
@@ -2,15 +2,26 if (release != 'rtm') {
2 2 version += "-$release"
3 3 }
4 4
5 println "version: $version"
5 if(!npmName)
6 npmName = name;
7
8 ext.packageName="$npmScope/$npmName";
6 9
7 def distDir = "$buildDir/dist"
8 def testDir = "$buildDir/test"
10 def packageDir = "$buildDir/dist"
11 def distDir = "$packageDir/$platform"
12 def testDir = "$packageDir/$platform"
13
14 task printVersion {
15 println "version: $version"
16 println "packageName: $packageName"
17 println "platform: $platform"
18 }
19
9 20
10 21 task clean {
11 22 doLast {
12 23 delete buildDir
13 delete 'node_modules/@implab'
24 delete "node_modules/$packageName"
14 25 }
15 26 }
16 27
@@ -40,7 +51,7 task _buildTs(dependsOn: _npmInstall, ty
40 51 inputs.file('tsconfig.json')
41 52 outputs.dir(distDir)
42 53
43 commandLine 'node_modules/.bin/tsc', '-p', 'tsconfig.json'
54 commandLine 'node_modules/.bin/tsc', '-p', 'src/tsconfig.json', '--outDir', distDir
44 55 }
45 56
46 57 task _packageMeta(type: Copy) {
@@ -64,7 +75,7 task build(dependsOn: [_legacyJs, _npmIn
64 75 task _localInstall(dependsOn: build, type: Exec) {
65 76 inputs.file("$distDir/package.json")
66 77 outputs.upToDateWhen {
67 new File("$projectDir/node_modules/@implab/core").exists()
78 new File("$projectDir/node_modules/$packageName").exists()
68 79 }
69 80
70 81 commandLine 'npm', 'install', '--no-save', '--force', distDir
@@ -77,10 +88,10 task copyJsTests(type: Copy) {
77 88
78 89 task buildTests(dependsOn: _localInstall, type: Exec) {
79 90 inputs.dir('test/ts')
80 inputs.file('tsconfig.test.json')
91 inputs.file('test/tsconfig.json')
81 92 outputs.dir(testDir)
82
83 commandLine 'node_modules/.bin/tsc', '-p', 'tsconfig.test.json'
93
94 commandLine 'node_modules/.bin/tsc', '-p', 'test/tsconfig.json', '--outDir', distDir
84 95 }
85 96
86 97 task test(dependsOn: [copyJsTests, buildTests], type: Exec) {
@@ -1,2 +1,8
1 1 version=1.2.0
2 release=rc No newline at end of file
2 release=rc
3 platform=amd
4 descriptrion=Dependency injection, logging, simple and fast text template engine
5 license=BSD-2-Clause
6 repository=https://bitbucket.org/implab/implabjs
7 npmScope=@implab
8 npmName=core No newline at end of file
@@ -12,4 +12,4
12 12
13 13 //include 'sub-project-name'
14 14
15 rootProject.name = 'implab-core' No newline at end of file
15 rootProject.name = 'core' 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