Skip to content

Commit a183c9a

Browse files
committed
Changing compile location etc.
1 parent 2b1cf3a commit a183c9a

19 files changed

Lines changed: 339 additions & 1417 deletions

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@
1414

1515
# Ignore tscache
1616
.tscache
17+
18+
# Ignore .baseDir related things
19+
# These are only used as transient items due to compiling TypeScript. They may
20+
# become useful when the project can fully move to TypeScript.
21+
.baseDir.ts
22+
.baseDir.js
23+
.baseDir.js.map

Gruntfile.coffee

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = (grunt) ->
22
require('load-grunt-tasks') grunt , {
33
pattern: ['grunt-*', '!grunt-template-jasmine-istanbul']
44
}
5+
# Read package.json to make sure it's there
56
grunt.file.readJSON('package.json')
67

78
# !! Compile configurations
@@ -15,9 +16,10 @@ module.exports = (grunt) ->
1516

1617
SRC_CORE = [
1718
'src/Array.js'
18-
'src/core/CommentSpaceAllocator.js'
19-
'src/core/Comment.js'
20-
'src/core/CommentFactory.js'
19+
'src/core/js/CommentUtils.js'
20+
'src/core/js/Comment.js'
21+
'src/core/js/CommentFactory.js'
22+
'src/core/js/CommentSpaceAllocator.js'
2123
'src/CommentManager.js'
2224
]
2325

@@ -30,17 +32,18 @@ module.exports = (grunt) ->
3032

3133
# Typescript targets
3234
SRC_TS_CORE = [
33-
'Comment'
34-
'CommentFactory'
35-
'CommentSpaceAllocator'
35+
'src/core/Comment.ts'
36+
'src/core/CommentFactory.ts'
37+
'src/core/CommentSpaceAllocator.ts'
38+
'src/core/CommentUtils.ts'
3639
]
3740

3841
SRC_TS_SCRIPTING_KAGEROU =
39-
'display': 'src/scripting/api/Display/Display.ts'
40-
'runtime': 'src/scripting/api/Runtime/Runtime.ts'
41-
'player': 'src/scripting/api/Player/Player.ts'
42-
'utils': 'src/scripting/api/Utils/Utils.ts'
43-
'tween': 'src/scripting/api/Tween/Tween.ts'
42+
'Display': ['src/scripting/api/Display/Display.ts']
43+
'Runtime': ['src/scripting/api/Runtime/Runtime.ts']
44+
'Player': ['src/scripting/api/Player/Player.ts']
45+
'Utils': ['src/scripting/api/Utils/Utils.ts']
46+
'Tween': ['src/scripting/api/Tween/Tween.ts']
4447

4548
# ==== Below this point is logic to generate compile configurations ====
4649
# You probably do not need to edit anything below here
@@ -51,23 +54,21 @@ module.exports = (grunt) ->
5154
for name, source of SRC_MODULES
5255
CMP_ALL = CMP_ALL.concat source
5356

54-
# Dynamically generate the core ts targets
55-
CMP_CORE_TS = {}
56-
CMP_CORE_NAME = []
57-
for target in SRC_TS_CORE
58-
CMP_CORE_NAME.push ("ts:core_" + target)
59-
CMP_CORE_TS["core_" + target] =
60-
src: ["src/core/" + target + ".ts"]
61-
out: "src/core/" + target + ".js"
57+
# Generate the core ts targets
58+
CMP_CORE_TS =
59+
'core':
60+
src: SRC_TS_CORE
61+
outDir: 'src/core/js/'
62+
CMP_CORE_NAME = ['ts:core']
6263

6364
# Dynamically generate the kagerou ts targets
6465
CMP_KAGEROU_TS = {}
6566
CMP_KAGEROU_NAME = []
66-
for target,src of SRC_TS_SCRIPTING_KAGEROU
67-
CMP_KAGEROU_NAME.push ('ts:kagerou_engine_' + target)
68-
CMP_KAGEROU_TS['kagerou_engine_' + target] =
67+
for target, src of SRC_TS_SCRIPTING_KAGEROU
68+
CMP_KAGEROU_NAME.push ('ts:kagerou_engine_' + target.toLowerCase())
69+
CMP_KAGEROU_TS['kagerou_engine_' + target.toLowerCase()] =
6970
src: src
70-
out: 'dist/scripting/api/' + src.split('/').pop().split('.')[0] + '.js'
71+
out: 'dist/scripting/api/' + target + '.js'
7172

7273
# Append Typescript Tasks
7374
ts_config =

0 commit comments

Comments
 (0)