0.6.2 • Published 2 years ago

@guardian/pkgu v0.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@guardian/pkgu

Automatically build @guardian packages for publishing to NPM inline with our recommendations.

npm (scoped)

Installation

Generic badge

yarn add -D @guardian/pkgu

or

npm install -D @guardian/pkgu

Usage

@guardian/pkgu installs a CLI tool called pkgu that you can use to create your build.

Commands

build

Example
// package.json
{
    ...,
    "scripts": {
        "prebuild": "rm -rf dist",
        "build": "pkgu build"
    },
    ...,
}

This will compile your project to a dist directory ready for publishing, performing the following steps:

  1. Lint your package.json and tsconfig.json files and update/add/remove any fields as necessary.
  2. Compile 3 versions of your project:
    1. CommonJS version targetting ES2018 (for Node 10+).
    2. ESM version targetting ES2020 for use by bundlers (see Using @guardian NPM packages in the recommendations for more info).
    3. TypeScript declaration files.
  3. Check that the build artefacts match the package.json config.
  4. If your package provides a CLI it will set the permissions needed to make it executable.

You should then be good to publish.

Requirements

  • Your source code is written in TypeScript.
  • The source code lives in a directory called src at the package root level.
  • There is one entry point: src/index.ts.
0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago