| @@ -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 | |
| @@ -1,94 +1,105 | |||
|
|
1 | 1 | 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 |
|
|
|
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 |
|
|
|
24 | delete "node_modules/$packageName" | |
|
|
14 | 25 | } |
|
|
15 | 26 | } |
|
|
16 | 27 | |
|
|
17 | 28 | task cleanNpm { |
|
|
18 | 29 | doLast { |
|
|
19 | 30 | delete 'node_modules' |
|
|
20 | 31 | } |
|
|
21 | 32 | } |
|
|
22 | 33 | |
|
|
23 | 34 | task _npmInstall() { |
|
|
24 | 35 | inputs.file("package.json") |
|
|
25 | 36 | outputs.dir("node_modules") |
|
|
26 | 37 | doLast { |
|
|
27 | 38 | exec { |
|
|
28 | 39 | commandLine 'npm', 'install' |
|
|
29 | 40 | } |
|
|
30 | 41 | } |
|
|
31 | 42 | } |
|
|
32 | 43 | |
|
|
33 | 44 | task _legacyJs(type:Copy) { |
|
|
34 | 45 | from 'src/js/' |
|
|
35 | 46 | into distDir |
|
|
36 | 47 | } |
|
|
37 | 48 | |
|
|
38 | 49 | task _buildTs(dependsOn: _npmInstall, type:Exec) { |
|
|
39 | 50 | inputs.dir('src/ts') |
|
|
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) { |
|
|
47 | 58 | inputs.property("version", version) |
|
|
48 | 59 | from('.') { |
|
|
49 | 60 | include 'package.json', '.npmignore', 'readme.md', 'license', 'history.md' |
|
|
50 | 61 | } |
|
|
51 | 62 | into distDir |
|
|
52 | 63 | doLast { |
|
|
53 | 64 | exec { |
|
|
54 | 65 | workingDir distDir |
|
|
55 | 66 | commandLine 'npm', 'version', version |
|
|
56 | 67 | } |
|
|
57 | 68 | } |
|
|
58 | 69 | } |
|
|
59 | 70 | |
|
|
60 | 71 | task build(dependsOn: [_legacyJs, _npmInstall, _buildTs, _packageMeta]) { |
|
|
61 | 72 | |
|
|
62 | 73 | } |
|
|
63 | 74 | |
|
|
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/ |
|
|
|
78 | new File("$projectDir/node_modules/$packageName").exists() | |
|
|
68 | 79 | } |
|
|
69 | 80 | |
|
|
70 | 81 | commandLine 'npm', 'install', '--no-save', '--force', distDir |
|
|
71 | 82 | } |
|
|
72 | 83 | |
|
|
73 | 84 | task copyJsTests(type: Copy) { |
|
|
74 | 85 | from 'test/js' |
|
|
75 | 86 | into testDir |
|
|
76 | 87 | } |
|
|
77 | 88 | |
|
|
78 | 89 | task buildTests(dependsOn: _localInstall, type: Exec) { |
|
|
79 | 90 | inputs.dir('test/ts') |
|
|
80 |
inputs.file('tsconfig |
|
|
|
91 | inputs.file('test/tsconfig.json') | |
|
|
81 | 92 | outputs.dir(testDir) |
|
|
82 | ||
|
|
83 |
commandLine 'node_modules/.bin/tsc', '-p', 'tsconfig. |
|
|
|
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) { |
|
|
87 | 98 | commandLine 'node', 'run-amd-tests.js' |
|
|
88 | 99 | } |
|
|
89 | 100 | |
|
|
90 | 101 | task pack(dependsOn: build, type: Exec) { |
|
|
91 | 102 | workingDir = distDir |
|
|
92 | 103 | |
|
|
93 | 104 | commandLine 'npm', 'pack' |
|
|
94 | 105 | } No newline at end of file |
| @@ -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 | |
| @@ -1,15 +1,15 | |||
|
|
1 | 1 | /* |
|
|
2 | 2 | * This settings file was generated by the Gradle 'init' task. |
|
|
3 | 3 | * |
|
|
4 | 4 | * The settings file is used to specify which projects to include in your build. |
|
|
5 | 5 | * In a single project build this file can be empty or even removed. |
|
|
6 | 6 | * |
|
|
7 | 7 | * Detailed information about configuring a multi-project build in Gradle can be found |
|
|
8 | 8 | * in the user guide at https://docs.gradle.org/3.5/userguide/multi_project_builds.html |
|
|
9 | 9 | */ |
|
|
10 | 10 | |
|
|
11 | 11 | // To declare projects as part of a multi-project build use the 'include' method |
|
|
12 | 12 | |
|
|
13 | 13 | //include 'sub-project-name' |
|
|
14 | 14 | |
|
|
15 |
rootProject.name = ' |
|
|
|
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
