npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fluid-publish

v2.4.1

Published

A command line tool and node module that can be used to simplify the process of publishing a module to NPM. This is particularly useful for creating development releases, e.g. nightly or continuous integration releases.

Downloads

393

Readme

fluid-publish

A command line tool and node module that can be used to simplify the process of publishing a module to NPM. This is particularly useful for creating development releases, e.g. nightly or continuous integration releases.

By default this will create a release with version X.x.x-prerelease.yyyymmddThhmmssZ.shortHash where X.x.x is sourced from the version number in the package.json file, -prerelease is from the devTag option (also applied as a tag to the release), and the yyyymmddThhmmssZ.shortHash build identifier is generated based on the latest commit.

Installation

# global install
npm install fluid-publish -g

# local dev install
npm install fluid-publish --save-dev

Usage

Command Line API

Run these commands from the root directory of the module to be published.

# creates a dev release (global install)
fluid-publish

# creates a dev release (local install)
./node_modules/.bin/fluid-publish

--version

value: true (Boolean)

Returns the current version of the Fluid-Publish module itself. No publishing steps will occur when this flag is enabled.

# returns the version of fluid-publish
fluid-publish --version
# fluid-publish 2.0.0

--standard

value: true (Boolean)

Specifies that a standard release should be generated. This creates a release named after the version in the package.json file. It will not increase the version number. However, it will create a tag and publish this tag to the version control system.

# creates a standard release
fluid-publish --standard

--test

value: true (Boolean)

Specifies that a tarball should be created instead of publishing to NPM. This is useful to use a means of testing that the publish will happen correctly.

# creates a tarball
fluid-publish --test
fluid-publish --test --standard

# publishes to NPM
fluid-publish
fluid-publish --standard

--otp

value: (String)

Specifies the one-time password to use. This is required if the NPM account has two-factor authentication enabled.

# publishes to NPM and authenticating with a one-time password
fluid-publish --otp=12345

options

Optional key/value pairs, in the form key=value, to override the default configuration used across the publish script. The defaults can be found in publish.js's package.json file under the defaultOptions key.

NOTE: If only a key is provided, the value is assumed to be true

(See: Options, process.argv)

# publishes a dev build and applies the tag "nightly" to it
fluid-publish devTag="nightly"

JavaScript API

fluid.publish can also be accessed through standard JavaScript function calls in a node app.

dev

Publishes a development build. This creates a release named after the version, but with the build stamp appended to the end. By default this will create a release with version X.x.x-prerelease.yyyymmddThhmmssZ.shortHash where X.x.x is sourced from the version number in the package.json file, -prerelease is from the devTag option (also applied as a tag to the release), and the build identifier (yyyymmddThhmmssZ.shortHash) is generated based on the latest commit.

var publish = require("fluid-publish");
publish.dev();
arguments
  1. isTest {Boolean} - Indicates if this is a test run, if true a tarball will be generated instead of publishing to NPM.
  2. options {Object} - The defaults can be found in publish.js's package.json file under the defaultOptions key. (See: Options)

standard

Publishes a release build. This creates a release named after the version in the package.json file. By default it will not increase the version number, this must be done separately. However, it will create a tag and publish this tag to the version control system.

var publish = require("fluid-publish");
publish.standard();
arguments
  1. isTest {Boolean} - Indicates if this is a test run, if true a tarball will be generated instead of publishing to NPM.
  2. options {Object} - The defaults can be found in publish.js's package.json file under the defaultOptions key. (See: Options)

Options

Publishing Itself

Publish can publish itself to NPM. This can be done using any of the usage methods described above, or via the NPM pub script defined in package.json. The script makes use of the command line interface provided to interact with publish.js. However, with NPM you'll need to provide a set of "--" to identify arguments to the script.

# publishes a dev release to NPM
npm run pub

# publishes a standard release to NPM
npm run pub -- --standard