Skip to content
Check compiled content between different ts2php versions. Make upgrade easy again!
JavaScript TypeScript
Branch: master
Clone or download
meixg Merge pull request #1 from meixg/dependabot/npm_and_yarn/npm-6.13.4
chore(deps): bump npm from 6.13.1 to 6.13.4
Latest commit 48901b1 Dec 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin feat: omit check command Nov 20, 2019
src feat: replace git-diff by diff Nov 28, 2019
.babelrc feat: init Nov 19, 2019
.gitignore chore: gitignore Nov 20, 2019
.npmignore feat: first version Nov 20, 2019
.travis.yml chore: travis config Nov 20, 2019
README.md chore: readme Nov 20, 2019
gulpfile.js feat: support using .js file instead of version Nov 20, 2019
package-lock.json chore(deps): bump npm from 6.13.1 to 6.13.4 Dec 13, 2019
package.json feat: replace git-diff by diff Nov 28, 2019
tsconfig.json feat: init Nov 19, 2019

README.md

ts2php-diff-checker

Check compiled content between different ts2php versions. Make upgrade easy again!

Language Build Status npm package npm downloads semantic-release

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
You can’t perform that action at this time.