GithubHelp home page GithubHelp logo

justluiz / publish-flat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ffflorian/publish-flat

1.0 1.0 0.0 2.51 MB

Publish your project flattened

Home Page: https://npmjs.com/package/@ffflorian/publisher

License: GNU General Public License v3.0

TypeScript 71.81% JavaScript 28.19%

publish-flat's Introduction

publish-flat Build Status npm version

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

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.

publish-flat's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar ffflobot avatar ffflorian avatar

Stargazers

 avatar

Watchers

 avatar

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.