ts2php-diff-checker
v1.2.0
Published
Check compiled content between different ts2php versions. Make upgrade easy again!
Downloads
7
Readme
ts2php-diff-checker
Check compiled content between different ts2php versions. Make upgrade easy again!
install
npm i -g ts2php-diff-checker
usage
Use different versions of ts2php to compile files that match pattern, and check diff between them.
Output diff results to a file if destination specified.
ts2php-check <pattern> <old-version> <new-version> [destination]
use -c
to specify a compile config for ts2php:
ts2php-check ./**/index.ts 0.16.0 0.16.1 -c ./config.js
// config.js
module.exports = {
modules: {
},
getNamespace(file) {
// console.log(file);
return 'filename';
},
getModuleNamespace(name) {
if (!/^\./.test(name)) {
return '\\';
}
return '\\' + name + '\\';
}
};
use .js file directly
While you working on ts2php, you may want to specify a file to use.
ts2php-check 0.12.12 /path/to/ts2php/dist/index.js