-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,14 @@ jobs: | |
run: '[[ "$VERSION" = "$GITHUB_REF_NAME" ]]' | ||
env: | ||
VERSION: ${{ steps.determine-version.outputs.version }} | ||
- run: | | ||
set -e | ||
deno run -A dnt.ts "$VERSION" | ||
pushd npm/ | ||
npm pack --dry-run | ||
popd | ||
env: | ||
VERSION: ${{ steps.determine-version.outputs.version }} | ||
- run: deno install -Af --unstable https://x.nest.land/[email protected]/eggs.ts | ||
- run: "eggs link '${{ secrets.NEST_API_KEY }}'" | ||
- if: github.ref_type == 'tag' | ||
|
@@ -95,3 +103,14 @@ jobs: | |
with: | ||
name: eggs-debug.log | ||
path: ${{ github.workspace }}/eggs-debug.log | ||
- run: | | ||
set -e | ||
cd npm/ | ||
npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN" | ||
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then | ||
npm publish | ||
else | ||
npm publish --tag dev | ||
fi | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.cov/ | ||
docs/ | ||
npm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ aitertools | |
========== | ||
|
||
[![Latest version][Tag badge]][Deno module] | ||
[![Published on npm][npm badge]][npm] | ||
[![Published on nest.land][nest.land badge]][nest.land] | ||
[![LGPL 3.0][License badge]](./LICENSE) | ||
[![Deno Doc (API references)][Deno Doc badge]][Deno Doc] | ||
|
@@ -12,10 +13,12 @@ aitertools | |
|
||
This library provides a [well-tested][Codecov] collection of small utility | ||
functions dealing with [async iterables]. You can think of it as .NET LINQ or | ||
Python aitertools for [Deno]. | ||
Python aitertools for [Deno] & Node.js. | ||
|
||
[Tag badge]: https://img.shields.io/github/v/tag/dahlia/aitertools | ||
[Deno module]: https://deno.land/x/aitertools | ||
[npm badge]: https://img.shields.io/npm/v/aitertools | ||
[npm]: https://www.npmjs.com/package/aitertools | ||
[nest.land badge]: https://nest.land/badge.svg | ||
[nest.land]: https://nest.land/package/aitertools | ||
[License badge]: https://img.shields.io/github/license/dahlia/aitertools | ||
|
@@ -80,15 +83,30 @@ In Deno: | |
import * as aitertools from "https://deno.land/x/aitertools/mod.ts"; | ||
~~~ | ||
|
||
In Node.js: | ||
|
||
~~~ console | ||
$ npm add aitertools | ||
~~~ | ||
|
||
~~~ typescript | ||
import * as aitertools from "aitertools"; | ||
~~~ | ||
|
||
|
||
Changelog | ||
--------- | ||
|
||
See *[CHANGES.md](CHANGES.md)* file. Note that unreleased versions are also | ||
available on [nest.land]: | ||
available on [nest.land] for Deno: | ||
|
||
~~~ typescript | ||
import * as aitertools | ||
from "https://x.nest.land/[email protected]+3f191d7/mod.ts"; | ||
~~~ | ||
|
||
… and on [npm] with `dev` tag for Node.js: | ||
|
||
~~~ console | ||
$ npm add aitertools@dev | ||
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
await emptyDir("./npm"); | ||
|
||
const version = Deno.args[0]; | ||
|
||
await build({ | ||
entryPoints: ["./mod.ts"], | ||
outDir: "./npm", | ||
package: { | ||
// package.json properties | ||
name: "aitertools", | ||
version, | ||
description: "Well-tested utility functions dealing with async iterables", | ||
keywords: [ | ||
"iterable", | ||
"iterator", | ||
"async", | ||
"stream", | ||
"async-iterable", | ||
"async-iterator", | ||
], | ||
license: "LGPL-3.0-or-later", | ||
author: { | ||
name: "Hong Minhee", | ||
email: "[email protected]", | ||
url: "https://hongminhee.org/", | ||
}, | ||
homepage: "https://github.com/dahlia/aitertools", | ||
repository: { | ||
type: "git", | ||
url: "git+https://github.com/dahlia/aitertools.git", | ||
}, | ||
bugs: { | ||
url: "https://github.com/dahlia/aitertools/issues", | ||
}, | ||
}, | ||
shims: { | ||
deno: true, | ||
}, | ||
typeCheck: "both", | ||
test: true, | ||
declaration: "separate", | ||
esModule: true, | ||
rootTestDir: "./tests", | ||
}); | ||
|
||
// post build steps | ||
Deno.copyFileSync("LICENSE", "npm/LICENSE"); | ||
Deno.copyFileSync("README.md", "npm/README.md"); | ||
Deno.copyFileSync("CHANGES.md", "npm/CHANGES.md"); |