ts2php-diff-checker

1.2.0 • Public • Published

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

Dependents (0)

Package Sidebar

Install

npm i ts2php-diff-checker

Weekly Downloads

0

Version

1.2.0

License

ISC

Unpacked Size

10.9 kB

Total Files

5

Last publish

Collaborators

  • meixg