forked from pixijs-userland/spine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c93fd4
commit 89a4622
Showing
9 changed files
with
67 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,3 @@ dist | |
gh-pages | ||
build-es6 | ||
.idea | ||
|
||
# build temp | ||
compilation.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "6" | ||
- "6.1" | ||
- "5.11" | ||
- "7.10" | ||
- "8.4" | ||
|
||
cache: | ||
yarn: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env node | ||
var fs = require('fs'); | ||
var glob = require('glob'); | ||
var path = require('path'); | ||
|
||
var sourcePath = path.resolve(__dirname, '../src'); | ||
var files = glob.sync(sourcePath + '/**/*.ts'); | ||
|
||
var filesCompilation = ''; | ||
|
||
for (var i in files) { | ||
var filePath = files[i]; | ||
var fileContents = fs.readFileSync(filePath); | ||
|
||
filesCompilation += fileContents; | ||
} | ||
|
||
var tmp = require('tmp'); | ||
var process = require('child_process'); | ||
|
||
tmp.file(function (err, filename) { | ||
fs.writeFileSync(filename, filesCompilation); | ||
|
||
process.exec('tsc ' + filename + ' -d --removeComments', function(err, stdout, stderr) { | ||
var dtsPath = filename.replace('.ts', '.d.ts'); | ||
var dtsContent = '' + fs.readFileSync(dtsPath); | ||
|
||
fs.writeFileSync( | ||
path.resolve('bin/pixi-spine.d.ts'), | ||
dtsContent.replace(/namespace pixi_spine/g, 'module PIXI.spine') | ||
); | ||
}); | ||
}, {postfix: '.ts'}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "none", | ||
"outFile": "bin/pixi-spine-with-namespace.js", | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"sourceMap": true, | ||
"preserveConstEnums": true, | ||
"removeComments": true, | ||
"inlineSources": true, | ||
"declaration": true, | ||
"typeRoots": ["node_modules/@types"] | ||
}, | ||
"include": [ | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
"node_modules/**/*", | ||
"compilation.ts", | ||
"bin" | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "none", | ||
"outFile": "bin/pixi-spine.js", | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"sourceMap": true, | ||
"preserveConstEnums": true, | ||
"removeComments": true, | ||
"inlineSources": true, | ||
"declaration": false, | ||
"typeRoots": [ | ||
"node_modules/@types" | ||
] | ||
}, | ||
"include": [ | ||
"src/core/**/*.ts", | ||
"src/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules/**/*", | ||
"bin" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.