Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ianpurvis/shakediff
Shake an es6 module for named exports and diff the result
https://github.com/ianpurvis/shakediff
bundlers diff es6 modules rollup tree-shaking
Last synced: about 1 month ago
JSON representation
Shake an es6 module for named exports and diff the result
- Host: GitHub
- URL: https://github.com/ianpurvis/shakediff
- Owner: ianpurvis
- License: mit
- Created: 2020-08-28T15:31:39.000Z (about 4 years ago)
- Default Branch: trunk
- Last Pushed: 2020-09-25T18:59:28.000Z (about 4 years ago)
- Last Synced: 2023-09-19T15:29:27.804Z (about 1 year ago)
- Topics: bundlers, diff, es6, modules, rollup, tree-shaking
- Language: JavaScript
- Homepage:
- Size: 407 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shakediff
Shake an es6 module for named exports and diff the result.
## Synopsis:
shakediff [options]
## Options:
-b {parcel|rollup|webpack}, --bundler={parcel|rollup|webpack}
Choose a bundler, or use the specified . 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-webpackOr 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=
Diff with the specified . 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](http://opensource.org/licenses/MIT).[![https://purvisresearch.com](.logo.svg)](https://purvisresearch.com)