From 582b24a8dc173c081ce3242f7f0903e8adfcd978 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Wed, 17 Apr 2024 19:07:30 -0700 Subject: [PATCH] setup --- README.md | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 73f33df..9bde629 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,16 @@ -# template ts browser -![tests](https://github.com/nichoth/template-ts-browser/actions/workflows/nodejs.yml/badge.svg) -[![types](https://img.shields.io/npm/types/@nichoth/catch-links?style=flat-square)](README.md) -[![module](https://img.shields.io/badge/module-ESM%2FCJS-blue?style=flat-square)](README.md) +# link +![tests](https://github.com/bicycle-codes/link/actions/workflows/nodejs.yml/badge.svg) +[![types](https://img.shields.io/npm/types/@bicycle-codes/link?style=flat-square)](README.md) +[![module](https://img.shields.io/badge/module-ESM-blue?style=flat-square)](README.md) [![semantic versioning](https://img.shields.io/badge/semver-2.0.0-blue?logo=semver&style=flat-square)](https://semver.org/) [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -A template for typescript *dependency* modules that run in a browser environment. -Uses `tape-run` for tests in a browser. See [template-ts](https://github.com/nichoth/template-ts) for the same thing but targeting Node. +Link multiple devices via websocket. -## use -1. Use the template button in github. Or clone this then -`rm -rf .git && git init`. Then `npm i && npm init`. - -2. Edit the source code in `src/index.ts`. +## install -## featuring +```sh +npm i -S @bicycle-codes/link +``` -* compile the source to both ESM and CJS format, and put compiled files in `dist`. -* ignore `dist` and `*.js` in git, but don't ignore them in npm. That way we - don't commit any compiled code to git, but it is available to consumers. -* use npm's `prepublishOnly` hook to compile the code before publishing to npm. -* use [exports](./package.json#L41) field in `package.json` to make sure the right format is used - by consumers. -* `preversion` npm hook -- lint -* `postversion` npm hook -- `git push --follow-tags && npm publish` -* eslint -- `npm run lint` -* tests run in a browser environment via `tape-run` -- see [`npm test`](./package.json#L12). - Includes `tap` testing tools -- [tapzero](https://github.com/bicycle-codes/tapzero) - and [tap-arc](https://www.npmjs.com/package/tap-arc) -* CI via github actions +## use