Change Default
Description
Convert exports.default to module.exports for all .js files in specified directories recursively
You can specify directory by --dir option
Note: it will not change if more exports are occurred
Installation
npm install -g change-default
Github Repository Source Code
Usage
$: change-default --dir=build
--dir is optional
default dir is current directory
Examples
Before
{ return x + y;}exportsdefault = add;
After
{ return x + y;}moduleexports = add;
Will not work when:
{ return x + y;}exportsowner = "Manick";exportsdefault = add;
if there is more exports it will not change anything
License
The MIT License (MIT) - 2019