Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align private-npm-package #74

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/small-penguins-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

**template/private-npm-package:** Include a half-decent README
81 changes: 59 additions & 22 deletions template/private-npm-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,86 @@

[![Powered by skuba](https://img.shields.io/badge/🤿%20skuba-powered-009DC4)](https://github.com/seek-oss/skuba)

<!--
This package is intended to be private on [SEEK-Jobs] under the `@seek` npm org.
To create a public package,
run `skuba init` and select the `oss-npm-package` template.

## Table of contents

- [Usage](#usage)
- [Design](#design)
- [API](#api)
- [Development](#development)
- [Support](#support)
- [Release](#release)

## Usage
## API

...
### `log`

## Design
Writes "<%- moduleName %>" to stdout.
Thrilling stuff.

...
```typescript
import { log } from '<%- moduleName %>';

log();
```

## Development

...
### Prerequisites

- Node.js LTS
- Yarn 1.x

```shell
yarn install
```

### Test

```shell
yarn test
```

### Lint

## Support
```shell
# fix
yarn format

...
# check
yarn lint
```

-->
### Package

To publish your module to npm and release notes to GitHub:
```shell
# compile source
yarn build

# review bundle
npm pack
```

## Release

While a Buildkite pipeline for CI/CD is generated out of the box, there are some additional steps to get semantic-release working:
This package is published to the npm registry under the private `@seek` npm org with [Gutenberg], SEEK's central npm publishing pipeline.

It depends on this repo being hosted on [SEEK-Jobs] with access to the npm Buildkite queue and CI GitHub user.

<https://github.com/SEEK-Jobs/npm-package-buildkite-pipeline#installing-on-your-repository>
See the Gutenberg [installing on your repository] instructions to configure this access.

### Releasing latest

Commits to the `master` branch will be released with the `latest` tag, which is the default used when running `npm install` or `yarn install`.
Commits to the `master` branch will be released with the `latest` tag,
which is the default used when running `npm install` or `yarn install`.

### Releasing other dist-tags

semantic-release prescribes a branch-based workflow for managing [distribution tags].

[distribution tags]: https://docs.npmjs.com/adding-dist-tags-to-packages
**[semantic-release]** prescribes a branch-based workflow for managing [distribution tags].

You can push to other branches to manage betas, maintenance updates to prior major versions, and more.

Here are some branches that semantic-release supports by default:
Here are some branches that **semantic-release** supports by default:

| Git branch | npm dist-tag |
| :--------- | :----------- |
Expand All @@ -59,6 +91,11 @@ Here are some branches that semantic-release supports by default:
| next | next |
| 1.x | release-1.x |

For more information, see the semantic-release docs:
For more information, see the **semantic-release** docs on [triggering a release].

<https://github.com/semantic-release/semantic-release/#triggering-a-release>
[distribution tags]: https://docs.npmjs.com/adding-dist-tags-to-packages
[gutenberg]: https://github.com/SEEK-Jobs/gutenberg
[installing on your repository]: https://github.com/SEEK-Jobs/gutenberg#installing-on-your-repository
[seek-jobs]: https://github.com/SEEK-Jobs
[semantic-release]: https://github.com/semantic-release/semantic-release
[triggering a release]: https://github.com/semantic-release/semantic-release/#triggering-a-release
6 changes: 3 additions & 3 deletions template/private-npm-package/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"files": ["lib*/**/*.d.ts", "lib*/**/*.js", "lib*/**/*.js.map"],
"license": "UNLICENSED",
"main": "./lib-commonjs",
"module": "./lib-es2015",
"main": "./lib-commonjs/index.js",
"module": "./lib-es2015/index.js",
"name": "<%- moduleName %>",
"repository": {
"type": "git",
Expand All @@ -21,6 +21,6 @@
"test": "skuba test"
},
"sideEffects": false,
"typings": "./lib-types",
"types": "./lib-types/index.d.ts",
"version": "0.0.0-semantically-released"
}