Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
/ ts2php-diff-checker Public archive

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

Notifications You must be signed in to change notification settings

meixg/ts2php-diff-checker

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published