# change-default

> Convert exports.default to module.exports for all .js files in specified directories

Latest version **1.1.2** (published 2019-09-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install change-default
pnpm add change-default
yarn add change-default
bun add change-default
```

Provides the command `change-default`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-09-12 |
| First published | 2019-09-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | creanick |
| Keywords | module, change-default, exports.default, module.exports, convert-export-default |

## Links

- npm: https://www.npmjs.com/package/change-default
- Repository: https://github.com/Creanick/change-default
- Homepage: https://github.com/Creanick/change-default#readme
- Issues: https://github.com/Creanick/change-default/issues
- npm.io page: https://npm.io/package/change-default

## Dependencies (2)

- [ora](https://npm.io/package/ora.md) ^3.4.0
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^14.0.0

## Recent versions

- 1.1.2 (latest) — 2019-09-12
- 1.1.1 — 2019-09-12
- 1.1.0 — 2019-09-12
- 1.0.0 — 2019-09-12

## README

# 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

```js
    npm install -g change-default
```

Github Repository
[Source Code](https://github.com/Creanick/change-default)

## Usage

```
$: change-default --dir=build
```

--dir is optional

default dir is current directory

## Examples

> Before

```javascript
function add(x, y) {
  return x + y;
}
exports.default = add;
```

> After

```javascript
function add(x, y) {
  return x + y;
}
module.exports = add;
```

> Will not work when:

```javascript
function add(x, y) {
  return x + y;
}
exports.owner = "Manick";
exports.default = add;
```

if there is more exports it will not change anything

## License

The MIT License (MIT) - 2019

---
_Source: https://npm.io/package/change-default · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
