1.11.4 • Published 3 months ago

publish-flat v1.11.4

Weekly downloads
308
License
GPL-3.0
Repository
-
Last release
3 months ago

publish-flat License: GPL v3 npm version

Publish your project flattened. No more dist in require('project/dist/Options').

Prerequisites

Installation

ℹ️ This is a hybrid CommonJS / ESM module.

Run yarn add publish-flat or npm i publish-flat.

Description

Here is what it does:

  1. Copies your dist files together with the other release files into a temporary directory
  2. Aligns your package.json to work with the flattened structure
  3. Publishes your project from the temporary directory (optional)

Example

Before

Directory structure of the published project:
.
├── dist
│   ├── index.d.ts
│   ├── index.js
│   ├── index.js.map
│   ├── Options.d.ts
│   ├── Options.js
│   └── Options.js.map
└── package.json
In other people's code:
import {Options} from 'project/dist/Options';

After

Directory structure of the published project:
.
├── index.d.ts
├── index.js
├── index.js.map
├── Options.d.ts
├── Options.js
├── Options.js.map
└── package.json
In other people's code:
import {Options} from 'project/Options';

Installation

yarn add publish-flat

CLI Usage

Usage: publish-flat [options] [dir]

Publish your project without the dist directory

Options:
  -V, --version        output the version number
  -y, --yarn           Use yarn for publishing (default: false)
  -f, --flatten <dir>  Which directory to flatten (default: "dist")
  -o, --output <dir>   Set the output directory (default: temp directory)
  -p, --publish        Publish (default: false)
  -h, --help           output usage information

API Usage

See cli.ts.

1.10.3

8 months ago

1.11.0

7 months ago

1.11.4

3 months ago

1.11.3

3 months ago

1.11.2

6 months ago

1.11.1

7 months ago

1.10.2

10 months ago

1.9.5

10 months ago

1.9.4

1 year ago

1.10.1

10 months ago

1.10.0

10 months ago

1.9.3

1 year ago

1.9.2

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.9

1 year ago

1.8.10

1 year ago

1.8.8

1 year ago

1.8.7

1 year ago

1.8.2

2 years ago

1.8.1

2 years ago

1.8.0

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.6.0

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

0.0.1

6 years ago