@@ -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