Skip to content

Commit b85b084

Browse files
committed
API-extractor
1 parent 9e28da0 commit b85b084

11 files changed

+740
-14
lines changed

.devcontainer/devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"eslint.format.enable": true,
2828
"files.exclude": {
2929
"dist/": true,
30-
"node_modules/": true
30+
"node_modules/": true,
31+
"temp/": true
3132
},
3233
"testExplorer.useNativeTesting": true
3334
},

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist
22
node_modules
3+
docs

.github/workflows/docgen.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Documentation Generation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build and Documentation
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 18
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Run clean
26+
run: npm run clean
27+
28+
- name: Run build
29+
run: npm run build
30+
31+
- name: Generate documentation
32+
run: |
33+
npm run docs
34+
35+
- name: Force-add changes
36+
run: git add --force docs
37+
38+
- name: Commit and force push changes
39+
run: |
40+
git config --global user.name "Documentation Bot"
41+
git config --global user.email "[email protected]"
42+
git commit -a -m "Automated: Update documentation and clean temp folder"
43+
git push

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/dist/
2+
/docs/
23
/node_modules/
4+
/temp/

.prettierignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
./github
2-
*.md
2+
./docs
3+
./temp
4+
*.md

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ First off, thanks for taking the time to contribute! ❤️
55
New features, ideas and bug fixes are always welcome! Everyone interacting in the project's code bases or issue trackers, is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
66

77
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
8+
>
89
> - Star the project
910
> - Tweet about it
1011
> - Refer this project in your project's readme
@@ -15,8 +16,7 @@ In order to contribute to this project, follow a few easy steps:
1516
1. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) this repository and clone it on your machine
1617
2. Open the local repository with [Visual Studio Code](https://code.visualstudio.com) with the remote development feature enabled (install the [Remote Development extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack))
1718
3. Create a branch `my-awesome-feature` and commit to it
18-
4. Run `npm run format`, `npm run lint`, `npm run test` and `npm run build`,
19-
or `npm run format && npm run lint && npm run test && npm run build` and verify that they complete without errors.
19+
4. Run npm run `pre-pull-request` and verify that they complete without errors.
2020
5. Push `my-awesome-feature` branch to GitHub and open a [pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
2121
6. Liked some of my work? Buy me a ☕ (or more likely 🍺)
2222

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ export const TodoItem = ({ item }) => {
193193
};
194194
```
195195

196+
## Documentation
197+
198+
The full documentation for this project can be found in [docs/react-directus.md](docs/react-directus.md). It contains detailed information about the components, usage, and additional features.
199+
196200
## 📱 React Native
197201

198202
To make the project fully compatible with React Native you need to install the [localstorage-polyfill](https://www.npmjs.com/package/localstorage-polyfill) package:

api-extractor.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"projectFolder": ".",
4+
"mainEntryPointFilePath": "<projectFolder>/dist/types/index.d.ts",
5+
"compiler": {
6+
"tsconfigFilePath": "<projectFolder>/tsconfig.json"
7+
},
8+
"apiReport": {
9+
"enabled": true,
10+
"reportFolder": "<projectFolder>/temp/",
11+
"includeForgottenExports": true
12+
},
13+
"docModel": {
14+
"enabled": true,
15+
"includeForgottenExports": true,
16+
"projectFolderUrl": "https://github.com/gremo/react-directus"
17+
},
18+
"dtsRollup": {
19+
"enabled": true
20+
},
21+
"messages": {
22+
"compilerMessageReporting": {
23+
"default": {
24+
"logLevel": "none"
25+
}
26+
},
27+
"extractorMessageReporting": {
28+
"default": {
29+
"logLevel": "none"
30+
}
31+
},
32+
"tsdocMessageReporting": {
33+
"default": {
34+
"logLevel": "none"
35+
}
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)