Skip to content

Commit da5953c

Browse files
committed
1.0.0-rc
1 parent c50d2eb commit da5953c

File tree

6 files changed

+69
-5
lines changed

6 files changed

+69
-5
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/cache@v2
13+
with:
14+
path: ~/.npm
15+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
16+
restore-keys: |
17+
${{ runner.os }}-node-
18+
- uses: actions/setup-node@v1
19+
with:
20+
node-version: 14
21+
- run: npm ci
22+
- run: npm run build:tsc
23+
- run: npm run build:lib
24+
- run: npm test
25+
- run: npm run build:package
26+
- uses: JS-DevTools/npm-publish@v1
27+
with:
28+
token: ${{ secrets.NPM_TOKEN }}
29+
package: "./dist-package/package.json"

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/cache@v2
15+
with:
16+
path: ~/.npm
17+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
18+
restore-keys: |
19+
${{ runner.os }}-node-
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: 14
24+
- run: npm ci
25+
- run: npm run build:tsc
26+
- run: npm run build:lib
27+
- run: npm test

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ Improvements to type definitions may be released as a new minor version even if
5757
## Contributing
5858

5959
Welcome
60+
61+
## License
62+
63+
This work is based on [TypeScript](https://github.com/microsoft/TypeScript)'s standard library created by Microsoft Corporation. We modify it as programmed in this repository and redistribute it under Apache 2.0 License.

build/package.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ async function main() {
2323
.map((libFile) => path.join(libDir, libFile))
2424
.concat(
2525
(await readdir(templateDir)).map((file) => path.join(templateDir, file))
26-
);
26+
)
27+
.concat([
28+
path.join(projectDir, "README.md"),
29+
path.join(projectDir, "LICENSE"),
30+
]);
2731
await Promise.all(
2832
files
2933
.map(async (libFile) => {

package-template/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "better-typescript-lib",
3-
"version": "0.0.1",
3+
"version": "1.0.0-rc",
44
"description": "Better TypeScript standard library",
55
"main": "index.js",
66
"types": "./lib.esnext.d.ts",
77
"keywords": [
88
"TypeScript"
99
],
1010
"author": "uhyo <uhyo@uhy.ooo>",
11-
"license": "MIT"
11+
"license": "Apache-2.0"
1212
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "better-typescript-lib",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "Better TypeScript standard library",
55
"main": "index.js",
66
"devDependencies": {
@@ -17,7 +17,7 @@
1717
},
1818
"keywords": [],
1919
"author": "uhyo <uhyo@uhy.ooo>",
20-
"license": "MIT",
20+
"license": "Apache-2.0",
2121
"tsd": {
2222
"directory": "tests",
2323
"compilerOptions": {

0 commit comments

Comments
 (0)