Skip to content

Commit 5262b6a

Browse files
authored
fix: build errors (#104)
1 parent d347a93 commit 5262b6a

File tree

21 files changed

+12516
-14715
lines changed

21 files changed

+12516
-14715
lines changed

.eslintrc.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ module.exports = {
88
jest: true
99
},
1010
extends: [
11-
'plugin:vue-libs/recommended',
1211
'plugin:@typescript-eslint/recommended',
1312
'plugin:@typescript-eslint/eslint-recommended',
14-
'prettier',
15-
'plugin:prettier/recommended'
13+
'plugin:prettier/recommended',
14+
'prettier'
1615
],
1716
plugins: ['@typescript-eslint'],
18-
parser: 'vue-eslint-parser',
1917
parserOptions: {
2018
parser: '@typescript-eslint/parser',
2119
sourceType: 'module'

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches-ignore:
5+
- gh-pages
6+
pull_request:
7+
branches-ignore:
8+
- gh-pages
9+
types:
10+
- opened
11+
- synchronize
12+
- reopened
13+
permissions:
14+
contents: read
15+
env:
16+
CI: true
17+
18+
jobs:
19+
lint:
20+
name: 'Lint'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v2.0.1
27+
with:
28+
version: 6.20.0
29+
- name: Setup Node.js v14.x
30+
uses: actions/setup-node@v2
31+
with:
32+
node-version: 14
33+
cache: 'pnpm'
34+
- name: Install
35+
run: pnpm install
36+
- name: Lint
37+
run: pnpm lint

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@ env:
99

1010
jobs:
1111
test:
12-
name: "Test on Node.js ${{ matrix.node }} OS: ${{matrix.os}}"
12+
name: 'Test on Node.js ${{ matrix.node }} OS: ${{matrix.os}}'
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
node: [12, 14]
17+
node: [12, 14, 16]
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v2
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v2.0.1
23+
with:
24+
version: 6.17.0
2125
- name: Setup Node.js ${{ matrix.node }}
2226
uses: actions/setup-node@v2
2327
with:
2428
node-version: ${{ matrix.node }}
29+
cache: 'pnpm'
2530
- name: Install
26-
run: yarn install
31+
run: pnpm install
2732
- name: Test
28-
run: yarn test
33+
run: pnpm test

README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# :book: api-docs-gen
1+
# 📔 api-docs-gen
22

33
![Test](https://github.com/kazupon/api-docs-gen/workflows/Test/badge.svg)
44
[![npm](https://img.shields.io/npm/v/api-docs-gen.svg)](https://www.npmjs.com/package/api-docs-gen)
55

66
API Documentation generator from `api-extractor` doc model
77

88

9-
## :hammer: Requirement
9+
## 🔨 Requirement
1010

1111
You need to generate **doc model** with using [`api-extractor`](https://api-extractor.com/)
1212

1313

14-
## :cd: Installation
14+
## 💿 Installation
1515

1616
### npm
1717

@@ -24,8 +24,13 @@ $ npm install -g api-docs-gen
2424
yarn global api-docs-gen
2525
```
2626

27+
### pnpm
28+
```sh
29+
pnpm add -g api-docs-gen
30+
```
2731

28-
## :rocket: Usage
32+
33+
## 🚀 Usage
2934

3035
### CLI
3136
```
@@ -42,7 +47,7 @@ Options
4247
```
4348

4449

45-
### API
50+
### 🤝 API
4651
```javascript
4752
const path = require('path')
4853
const { genereate, DefaultConfig } = require('api-docs-gen')
@@ -60,24 +65,22 @@ await generate(input, output, { style: 'prefix', config: DefaultConfig })
6065
About details, See the [API References](https://github.com/kazupon/api-docs-gen/blob/master/api-docs-gen-api.md)
6166

6267

63-
## :lollipop: Examples
68+
## 🍭 Examples
6469
You can play API docs generation that have [multi packages](https://github.com/kazupon/api-docs-gen/tree/master/examples/packages).
6570

6671
You can play with the following command:
6772

6873
```sh
69-
$ yarn example:setup # module installing on each package
70-
71-
$ yarn example:build # build on each package
74+
$ pnpm example:build # build on each package
7275

73-
$ yarn example:extract # generate doc model with `api-extractor` on each package
76+
$ pnpm example:extract # generate doc model with `api-extractor` on each package
7477

75-
$ yarn example:gen # genearte API docs with `api-docs-gen`
78+
$ pnpm example:gen # genearte API docs with `api-docs-gen`
7679

77-
$ yarn example:docs # run vuepress
80+
$ pnpm example:docs # run vuepress
7881
```
7982

80-
## :bookmark: TSDoc custom tags
83+
## 🔖 TSDoc custom tags
8184

8285
`api-docs-gen` allows TSDoc custom tags to be processed using [tsdoc-config](https://github.com/microsoft/tsdoc/tree/master/tsdoc-config).
8386

@@ -93,7 +96,7 @@ For the `MarkdownProcessor`, see the [API References](https://github.com/kazupon
9396

9497
See how to configure it in the following configration.
9598

96-
## :wrench: Configration
99+
## 🔧 Configration
97100
You can fully customize the generation of api docs using the config offered by `api-docs-gen`.
98101

99102
Here is the schema (typescript type definition) of the config:
@@ -120,16 +123,16 @@ If you want to customize your api docs, these will be helpful.
120123
It's recommended to refer to the [API References](https://github.com/kazupon/api-docs-gen/blob/master/api-docs-gen-api.md) for customization.
121124

122125

123-
## :scroll: Changelog
126+
## 📜 Changelog
124127
Details changes for each release are documented in the [CHANGELOG.md](https://github.com/kazupon/api-docs-gen/blob/master/CHANGELOG.md).
125128

126129

127-
## :exclamation: Issues
130+
## Issues
128131
Please make sure to read the [Issue Reporting Checklist](https://github.com/kazupon/api-docs-gen/blob/master/.github/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
129132

130-
## :white_check_mark: TODO
133+
## TODO
131134
Managed with [GitHub Projects](https://github.com/kazupon/api-docs-gen/projects/2)
132135

133-
## :copyright: License
136+
## ©️ License
134137

135138
[MIT](http://opensource.org/licenses/MIT)

api-docs-gen-api.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ export interface Config
4040
```
4141

4242

43-
#### Methods
44-
45-
4643
#### Properties
4744

4845
##### linkReferencer
@@ -186,9 +183,6 @@ export interface ContentBuilderOptions
186183
options that creating a [ContentBuilder](#contentbuilder)
187184

188185

189-
#### Methods
190-
191-
192186
#### Properties
193187

194188
##### indentLevel
@@ -211,9 +205,6 @@ export interface GenerateOptions
211205
```
212206

213207

214-
#### Methods
215-
216-
217208
#### Properties
218209

219210
##### config
@@ -292,9 +283,6 @@ export interface MarkdownContent
292283
```
293284

294285

295-
#### Methods
296-
297-
298286
#### Properties
299287

300288
##### body

lerna.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,33 @@
2727
}
2828
},
2929
"dependencies": {
30+
"@intlify/shared": "latest",
3031
"@microsoft/api-extractor-model": "^7.12.0",
3132
"@microsoft/tsdoc": "^0.13.0",
3233
"@microsoft/tsdoc-config": "^0.15.0",
3334
"chalk": "^4.1.1",
34-
"debug": "^4.3.1",
35-
"meow": "^10.0.0"
35+
"debug": "^4.3.3",
36+
"meow": "^9.0.0"
3637
},
3738
"devDependencies": {
38-
"@microsoft/api-extractor": "^7.12.0",
39+
"@kazupon/lerna-changelog": "^4.3.0",
40+
"@microsoft/api-extractor": "^7.18.21",
3941
"@types/debug": "^4.1.5",
4042
"@types/jest": "^26.0.23",
41-
"@types/meow": "^6.0.0",
42-
"@types/node": "^15.3.1",
43-
"@typescript-eslint/eslint-plugin": "^4.24.0",
44-
"@typescript-eslint/parser": "^4.24.0",
45-
"eslint": "^7.26.0",
43+
"@types/node": "^16.11.0",
44+
"@typescript-eslint/eslint-plugin": "^5.5.0",
45+
"@typescript-eslint/parser": "^5.5.0",
46+
"eslint": "^8.4.0",
4647
"eslint-config-prettier": "^8.3.0",
47-
"eslint-plugin-prettier": "^3.4.0",
48-
"eslint-plugin-vue-libs": "^4.0.0",
48+
"eslint-plugin-prettier": "^4.0.0",
4949
"jest": "^27.0.0",
5050
"jest-watch-typeahead": "^0.6.3",
51-
"lerna": "^4.0.0",
52-
"lerna-changelog": "^1.0.1",
5351
"npm-run-all": "^4.1.5",
5452
"opener": "^1.5.2",
55-
"prettier": "^2.3.0",
53+
"prettier": "^2.5.0",
5654
"shipjs": "^0.24.0",
5755
"ts-jest": "^27.0.0",
58-
"typescript": "^4.2.4",
59-
"typescript-eslint-language-service": "^4.1.4",
56+
"typescript": "^4.5.2",
6057
"vuepress": "^1.8.2"
6158
},
6259
"engines": {
@@ -86,12 +83,18 @@
8683
],
8784
"license": "MIT",
8885
"main": "lib/index.js",
86+
"pnpm": {
87+
"overrides": {
88+
"typescript": "^4.5.2",
89+
"@microsoft/api-extractor": "^7.18.21"
90+
}
91+
},
8992
"repository": {
9093
"type": "git",
9194
"url": "git+https://github.com/kazupon/api-docs-gen.git"
9295
},
9396
"scripts": {
94-
"build": "yarn build:transpile && yarn build:extract",
97+
"build": "pnpm build:transpile && pnpm build:extract",
9598
"build:docs": "node ./bin/run.js ./temp/api-docs-gen.api.json -c ./docsgen.config.js -o ./",
9699
"build:extract": "api-extractor run -l -c ./api-extractor.json",
97100
"build:transpile": "tsc -p .",
@@ -101,23 +104,22 @@
101104
"clean:extract": "rm -rf ./temp ./dist ./ect/*.md",
102105
"clean:lib": "rm -rf ./lib/*.*",
103106
"coverage": "opener coverage/lcov-report/index.html",
104-
"example": "yarn example:build && yarn example:extract && yarn example:gen",
105-
"example:build": "lerna run build",
106-
"example:clean": "lerna run clean && rm -rf examples/docs/api/*.md",
107+
"example": "pnpm example:build && pnpm example:extract && pnpm example:gen",
108+
"example:build": "pnpm build --filter ./examples/packages",
109+
"example:clean": "pnpm clean --filter ./examples/packages && rm -rf examples/docs/api/*.md",
107110
"example:docs": "vuepress dev examples/docs",
108-
"example:extract": "lerna run extract",
111+
"example:extract": "pnpm extract --filter ./examples/packages",
109112
"example:gen": "node ./bin/run.js ./examples/packages/utilities/temp/utilities.api.json ./examples/packages/library1/temp/library1.api.json -o ./examples/docs/api",
110-
"example:setup": "lerna bootstrap",
111113
"example:teardown": "rm -rf ./examples/packages/utilities/node_modules && rm -rf ./examples/packages/library1/node_modules",
112-
"fix": "npm-run-all --parallel lint:fix format:fix",
114+
"fix": "run-p \"lint:fix\" \"format:fix\"",
113115
"format": "prettier --config .prettierrc --ignore-path .prettierignore '**/*.{js,json,html}'",
114-
"format:fix": "yarn format --write",
116+
"format:fix": "pnpm format -- --write",
115117
"lint": "eslint ./src ./test --ext .ts",
116-
"lint:fix": "yarn lint --fix",
118+
"lint:fix": "pnpm lint -- --fix",
117119
"release:prepare": "shipjs prepare",
118120
"release:trigger": "shipjs trigger",
119-
"test": "yarn lint && yarn test:cover",
120-
"test:cover": "yarn test:unit --coverage",
121+
"test": "pnpm lint && pnpm test:cover",
122+
"test:cover": "pnpm test:unit -- --coverage",
121123
"test:unit": "jest --env node",
122124
"test:watch": "jest --env node --watch",
123125
"watch": "tsc -p . --watch"

0 commit comments

Comments
 (0)