1. @html-validate/release-scripts
Various script used by release toolchain
@html-validate/release-scripts
Package: @html-validate/release-scripts
Created by: html-validate
Last modified: Sun, 07 Apr 2024 04:07:21 GMT
Version: 6.4.0
License: MIT
Downloads: 15,197
Repository: git+https://gitlab.com/html-validate/semantic-release-config.git

Install

npm install @html-validate/release-scripts
yarn add @html-validate/release-scripts

@html-validate/release-scripts

Various scripts used by release toolchain.

release-pre{pack,publish} and release-post{pack,publish}

package.json:

 {
  "scripts": {
    "prepack": "release-prepack",
    "postpack": "release-postpack",
    "prepublishOnly": "release-prepublish",
    "postpublish": "release-postpublish"
  }
}

If the library or CLI tool bundles all dependencies use release-prepack --bundle.
Dependencies can also be filtered by marking dependencies as external using --bundle --external:foo --external:bar or listing them in the non-standard externalDependencies field "externalDependencies": ["foo", "bar"].

 {
  "scripts": {
    "prepack": "release-prepack --bundle --external:foo --external:bar",
    "postpack": "release-postpack",
    "prepublishOnly": "release-prepublish --bundle --external:foo --external:bar",
    "postpublish": "release-postpublish"
  }
}

or

 {
  "scripts": {
    "prepack": "release-prepack --bundle --external:foo --external:bar",
    "postpack": "release-postpack",
    "prepublishOnly": "release-prepublish --bundle",
    "postpublish": "release-postpublish"
  },
  "externalDependencies": ["foo", "bar"]
}

Usage

release-prepack [FILENAME] [OPTIONS..]
release-postpack [FILENAME]
release-prepublish [FILENAME] [OPTIONS..]
release-postpublish [FILENAME]

If FILENAME is set it is the filename to use instead of the default package.json.

Options

--bundle

By default the dependencies field in package.json is intact but if your package bundles its dependencies the --bundle flag can be used to strip out dependencies as well.

--external:${NAME}

When using in conjunction with --bundle it marks a dependency which should still be intact.
For instance, using --external:foobar all packages in dependencies except foobar will be stripped.
This flag can be used multiple times.

--retain-scripts

By default the scripts field is stripped but with this flag enabled the scripts will be intact.

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code