@stridekick/scripts

1.0.4 • Public • Published

@stridekick/scripts

A collection of npm scripts

Table of Contents

Installation

npm install --save @stridekick/scripts

Scripts

setNpmrc

In order to gain access to private npm modules, a local .npmrc file is created pointing to the npmjs repository with an approved token.

This function creates a .npmrc file with //registry.npmjs.org/:_authToken=${REACT_APP_NPM_TOKEN} as the contents.

The build will replace REACT_APP_NPM_TOKEN with the actual token.

Usage

  1. Add an heroku-prebuild npm script (see example)

  2. Set the REACT_APP_NPM_TOKEN environment variable in Heroku to an approved token.

Example (within package.json)

"scripts": {
  "heroku-prebuild": "node node_modules/@stridekick/scripts/dist/setNpmrc.js"
}

Publishing

To publish updates to the npm repository:

  1. Push all code changes to the code repository

  2. npm install

  3. Perform one of the following:

  • npm run publish:patch - {major}.{minor}.{patch +1}
  • npm run publish:minor - {major}.{minor + 1}.0
  • npm run publish:major - {major + 1}.0.0

Readme

Keywords

none

Package Sidebar

Install

npm i @stridekick/scripts

Weekly Downloads

5

Version

1.0.4

License

UNLICENSED

Last publish

Collaborators

  • johnnycon
  • carylandholt
  • hilsny
  • mikemckinley