Skip to content

Commit

Permalink
Update dependencies and use grunt-ts instead of grunt-typescript for …
Browse files Browse the repository at this point in the history
…compiling typescript.
  • Loading branch information
jabbany committed Sep 26, 2016
1 parent 21ae497 commit 1ae2994
Show file tree
Hide file tree
Showing 21 changed files with 441 additions and 806 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

# Ignore Node Modules
/node_modules/*

# Ignore CI
/compiled_spec/*
/coverage/*

# Ignore tscache
.tscache
22 changes: 9 additions & 13 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,24 @@ module.exports = (grunt) ->
CMP_CORE_TS = { }
CMP_CORE_NAME = [ ]
for target in SRC_CORE_CMP
CMP_CORE_NAME.push ("typescript:" + target)
CMP_CORE_NAME.push ("ts:" + target)
CMP_CORE_TS[target] =
options:
target: 'es5'
basePath: 'src/core'
src: "src/core/" + target + ".ts"
dest: "src/core/" + target + ".js"
src: ["src/core/" + target + ".ts"]
out: "src/core/" + target + ".js"

# Dynamically generate the kagerou ts targets
CMP_KAGEROU_TS = { }
CMP_KAGEROU_NAME = [ ]
for target,src of SRC_SCRIPTING_KAGEROU
CMP_KAGEROU_NAME.push ('typescript:kagerou_engine_' + target)
CMP_KAGEROU_NAME.push ('ts:kagerou_engine_' + target)
CMP_KAGEROU_TS['kagerou_engine_' + target] =
options:
target: 'es5'
basePath: src.split('/')[0..-1].join('/')
src: src
dest: 'build/scripting/api/' + src.split('/').pop().split('.')[0] + '.js'
out: 'build/scripting/api/' + src.split('/').pop().split('.')[0] + '.js'

# Append Typescript Tasks
ts_config = {}
ts_config =
options:
target: 'es5'
for key,value of CMP_CORE_TS
ts_config[key] = value
for key,value of CMP_KAGEROU_TS
Expand Down Expand Up @@ -99,7 +95,7 @@ module.exports = (grunt) ->
'build/CommentCoreLibrary.js': SRC_CORELIB

# Compile TypeScript
typescript: ts_config
ts: ts_config

# Copy
copy:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "comment-core-library",
"version": "0.9.2",
"version": "0.9.3",
"main": ["build/CommentCoreLibrary.js","build/style.css"],
"ignore": [
"test/**/*",
Expand Down
Loading

0 comments on commit 1ae2994

Please sign in to comment.