Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JS hosted documentation #1678

Merged
merged 4 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist
# @TODO: I'm not sure what's going on here, we're importing
# in JS file from TS files, better left ignored for now
/playgrounds
/docs
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Documentation
curquiza marked this conversation as resolved.
Show resolved Hide resolved

on:
push:
branches:
- feat/js-docs
curquiza marked this conversation as resolved.
Show resolved Hide resolved
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: yarn install

- name: Generate Documentation
run: yarn build:docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ typings/
# Output of 'npm pack'
*.tgz

# Generated Docs
docs/

# Yarn Integrity file
.yarn-integrity

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

## 📖 Documentation

This readme contains all the documentation you need to start using this Meilisearch SDK.
This readme and [Meilisearch JS documentation website](https://meilisearch.github.io/meilisearch-js/) contains all the information you need to start using this Meilisearch SDK.

For general information on how to use Meilisearch—such as our API reference, tutorials, guides, and in-depth articles—refer to our [main documentation website](https://www.meilisearch.com/docs/).

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"clear_jest": "jest --clearCache",
"cleanup": "shx rm -rf dist/",
"build": "yarn cleanup && rollup -c && rollup -c --environment NODE_ENV:production",
"build:docs": "typedoc",
"watch": "yarn cleanup && rollup -c --watch",
"postbuild": "yarn size && yarn typingsheader",
"test": "yarn clear_jest && jest --runInBand --verbose",
Expand Down Expand Up @@ -106,6 +107,7 @@
"rollup-plugin-typescript2": "^0.35.0",
"shx": "^0.3.2",
"ts-jest": "^29.1.1",
"typedoc": "^0.25.13",
"typescript": "^5.3.3"
}
}
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"target": "es2022",
"lib": ["ESNext", "dom"],
"strict": true,
"noImplicitReturns": true
}
"noImplicitReturns": true,
},
"include": ["src"],
}
31 changes: 31 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Meilisearch JS",
"entryPoints": ["./src"],
"out": "./docs",
"customCss": "./typedoc/style.css",
"groupOrder": [
"References",
"Modules",
"Namespaces",
"Enumerations",
"Enumeration Members",
"Classes",
"Interfaces",
"Type Aliases",
"Constructors",
"Properties",
"Variables",
"Functions",
"Accessors",
"Methods"
],
"navigation": {
"includeCategories": true,
"includeGroups": true
},
"navigationLinks": {
"Docs": "https://www.meilisearch.com/docs",
"GitHub": "https://github.com/meilisearch/meilisearch-js"
},
"githubPages": true
}
Loading