Git Product home page Git Product logo

deploi's Introduction

Deploi

Description

deploi is tiny cli tool that combines the functionality of athloi's version and publish commands to allow npm workspace-based monorepos to publish their public packages to npm in a single step.

The --version option is parsed with semver to determine the appropriate tag: if it contains alpha, beta, or similar, it will be published as a pre-release version.

Requirements

  • Node.js 18 or later
  • npm 8 or later

Examples

Publish as latest release

Running

npx deploi --version 2.0.0

Will...

  1. Update the version of all packages in the monorepo to 2.0.0
  2. Publish all non-private packages to npm as the latest version

Publish as pre-release

Running

npx deploi --version 2.0.0-alpha.1

Will...

  1. Update the version of all packages in the monorepo to 2.0.0-alpha.1
  2. Publish all non-private packages to npm tagged as pre-release versions

Usage with Circle CI

Add the following to your .circleci/config.yml:

jobs:
  publish_version:
    <<: *container_config_node
    steps:
      - *attach_workspace
      - run:
          name: Set npm auth token
          command: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ${HOME}/.npmrc
      - run:
          name: Build packages
          command: npm run build
      - run:
          name: NPM publish
          command: npx deploi --version ${CIRCLE_TAG}

Development

To run the tests:

npm t

To see the CLI in action:

npx . --version <version>

To see the CLI help:

npx . --help

To run the tests in watch mode:

npm run dev

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.