Skip to content

Commit

Permalink
Added keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderOMara committed Nov 3, 2024
1 parent 7be2891 commit 3999137
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

CRC functions with a parameterized engine optimized for both speed and size

![crc](https://img.shields.io/badge/crc-grey)
![digest](https://img.shields.io/badge/digest-grey)
![checksum](https://img.shields.io/badge/checksum-grey)
![hash](https://img.shields.io/badge/hash-grey)
![typescript](https://img.shields.io/badge/typescript-grey)
![esm](https://img.shields.io/badge/esm-grey)
![streamable](https://img.shields.io/badge/streamable-grey)
![crc-8](https://img.shields.io/badge/crc--8-grey)
![crc-16](https://img.shields.io/badge/crc--16-grey)
![crc-24](https://img.shields.io/badge/crc--24-grey)
![crc-32](https://img.shields.io/badge/crc--32-grey)
![crc-64](https://img.shields.io/badge/crc--64-grey)

# Features

- Pure TypeScript, run anywhere
Expand Down
10 changes: 7 additions & 3 deletions scripts/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ if (Deno.args.length !== 1 || !/^(dev|prod)$/.test(Deno.args[0])) {
}

const [env] = Deno.args;

const GITHUB_REPOSITORY = Deno.env.get('GITHUB_REPOSITORY');
const [description] = (await Deno.readTextFile('README.md'))
.split(/[\r\n]+/)
.filter((s) => /^\w/.test(s));
const readme = (await Deno.readTextFile('README.md')).split(/[\r\n]+/);
const [description] = readme.filter((s) => /^\w/.test(s));
const keywords = readme.map((s) => s.match(/^\!\[(.*)\]\((.*)\)/))
.filter((m) => m && m[2].startsWith('https://img.shields.io/badge/'))
.map((m) => m![1]);

await emptyDir('./npm');
await build({
Expand All @@ -29,6 +32,7 @@ await build({
name: denoJson.name,
version: denoJson.version,
description,
keywords,
license: denoJson.license,
sideEffects: false,
...(env !== 'prod' ? { private: true } : {}),
Expand Down

0 comments on commit 3999137

Please sign in to comment.