Git Product home page Git Product logo

shakediff's Introduction

shakediff

Shake an es6 module for named exports and diff the result.

Synopsis:

shakediff [options] <module file> <export list>

Options:

-b {parcel|rollup|webpack}, --bundler={parcel|rollup|webpack}
    Choose a bundler, or use the specified <module>. Default is "rollup".

    Bundlers are not installed by default, please make sure to install one:

        parcel:   @shakediff/bundler-parcel
        rollup:   @shakediff/bundler-rollup
        webpack:  @shakediff/bundler-webpack

    Or provide one with an esm import specifier:

        https://nodejs.org/api/esm.html#esm_import_specifiers

    Any module with the following interface can be used:

        export default async function bundle(entryPath, modulePath, tempDir) {
          return 'bundled module code'
        }

-t <tool>, --tool=<tool>
    Diff with the specified <tool>. Default is "diff".

-h, --help
    Display this help and exit.

Examples:

Shake module.mjs for "foo" using rollup:

$ shakediff module.mjs foo

Shake module.mjs for "foo" and "bar" using webpack:

$ shakediff -b webpack module.mjs foo bar

Output a unified diff:

$ shakediff -t "diff -u" module.mjs foo

Generate a diffstat:

$ shakediff module.mjs foo | diffstat

View a diff in gvim:

$ shakediff -t "gvim -df" module.mjs foo

View a histogram diff in git:

$ shakediff -t "git diff --no-index --histogram" module.mjs foo

License

This package is available as open source under the terms of the MIT License.

https://purvisresearch.com

shakediff's People

Contributors

ianpurvis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xeronith

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.