Skip to content

Commit 08dc7e5

Browse files
authored
Merge pull request #30 from brionmario/feat-improve-docs
docs: make doc site accessible
2 parents df89504 + 7415c72 commit 08dc7e5

File tree

6 files changed

+285
-12
lines changed

6 files changed

+285
-12
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,3 @@ testem.log
3939
Thumbs.db
4040

4141
.nx/cache
42-
43-
# docs
44-
docs/src/.vitepress/cache
45-
docs/src/.vitepress/dist

CONTRIBUTING.md

Lines changed: 98 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,88 @@
1-
## Contributing to Asgardeo Web UI SDKs
1+
# Contributing to Asgardeo Web UI SDKs
22

33
This guide walks you through setting up the development environment and other important information for contributing to Asgardeo Web UI SDKs.
44

5-
### Setting up development environment
5+
## Table of Contents
6+
- [Prerequisite Software](#prerequisite-software)
7+
- [Development Tools](#development-tools)
8+
- [NX Console](#nx-console)
9+
- [React Developer Tools](#react-developer-tools)
10+
- [ESLint Plugin](#eslint-plugin)
11+
- [Code Spell Checker](#code-spell-checker)
12+
- [JSON Sort Order](#json-sort-order)
13+
- [Setting up the Source Code](#setting-up-the-source-code)
14+
- [Setting up the Development Environment](#setting-up-the-development-environment)
15+
- [Contributing to the Documentation](#contributing-to-the-documentation)
16+
- [Commit Message Guidelines](#commit-message-guidelines)
17+
- [Commit Message Header](#commit-header)
18+
- [Type](#type)
19+
- [Scope](#scope)
20+
- [Summary](#summary)
21+
- [Commit Message Body](#commit-body)
22+
- [Commit Message Footer](#commit-footer)
23+
- [Revert commits](#revert-commits)
624

7-
> Prerequisites:
8-
>
9-
> Node.js: v18 or higher
10-
> PNPM: v9 or higher
25+
## Prerequisite Software
26+
27+
To build and write code, make sure you have the following set of tools on your local environment:
28+
29+
* [Git](https://git-scm.com/downloads) - Open source distributed version control system. For install instructions, refer [this](https://www.atlassian.com/git/tutorials/install-git).
30+
* [Node.js](https://nodejs.org/en/download/) - JavaScript runtime. (`v18 or higher`)
31+
* [pnpm](https://pnpm.io/) - Alternate npm client for faster package installs. (`v9 or higher`)
32+
33+
## Development Tools
34+
35+
### NX Console
36+
37+
Editor plugin which wraps NX commands so you don't have to memorize.
38+
39+
- [Install for VS Code](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
40+
- [Install for VS Web Storm](https://plugins.jetbrains.com/plugin/15000-nx-webstorm)
41+
42+
### React Developer Tools
43+
44+
Browser extension to debug React code.
45+
46+
- [Download for Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
47+
- [Download for Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)
48+
49+
### ESLint Plugin
50+
51+
Static code analysis tool for identifying problematic patterns found in JavaScript/Typescript code.
52+
53+
- [Install for VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
54+
- [Install for VS Web Storm](https://www.jetbrains.com/help/webstorm/eslint.html)
55+
56+
### Code Spell Checker
57+
58+
A basic spell checker that works well with code and documents.
59+
60+
- [Install for VS Code](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
61+
62+
### JSON Sort Order
63+
64+
Sorts JSON objects in alphabetical order.
65+
66+
- [Install for VS Code](https://marketplace.visualstudio.com/items?itemName=msyesyan.json-sorter)
67+
68+
## Setting up the Source Code
69+
70+
1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the repository.
71+
2. Clone your fork to the local machine.
72+
73+
Replace `<github username>` with your own username.
74+
75+
```shell
76+
git clone https://github.com/<github username>/web-ui-sdks.git
77+
```
78+
79+
3. Set the original repo as the upstream remote.
80+
81+
```shell
82+
git remote add upstream https://github.com/asgardeo/web-ui-sdks.git
83+
```
84+
85+
## Setting up the Development Environment
1186

1287
1. Install dependencies.
1388

@@ -21,6 +96,23 @@ pnpm install
2196
pnpm build
2297
```
2398

99+
## Contributing to the Documentation
100+
101+
We use [Vitepress](https://vitepress.dev/) to generate the documentation site. The documentation site is located in the `docs` directory.
102+
To contribute to the documentation, you can follow the steps below to start the Vitepress server locally.
103+
104+
1. Navigate to the `docs` directory.
105+
106+
```bash
107+
cd docs
108+
```
109+
110+
2. Start the Vitepress server.
111+
112+
```bash
113+
pnpm docs:dev
114+
```
115+
24116
## Commit Message Guidelines
25117

26118
*This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].*

docs/.gitignore

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
# misc
133+
.DS_Store
134+
*.pem
135+
136+
# .vitepress
137+
src/.vitepress/cache
138+
src/.vitepress/dist

docs/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
11
{
2+
"private": true,
3+
"name": "@asgardeo/web-ui-sdks-docs",
4+
"version": "0.1.0",
5+
"description": "Official documentation for the Asgardeo Web UI SDKs",
6+
"type": "module",
7+
"author": "WSO2",
8+
"license": "Apache-2.0",
9+
"files": [
10+
".vitepress/dist"
11+
],
12+
"homepage": "https://github.com/asgardeo/web-ui-sdks/tree/main/docs#readme",
13+
"bugs": {
14+
"url": "https://github.com/asgardeo/web-ui-sdks/issues"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/asgardeo/web-ui-sdks",
19+
"directory": "docs"
20+
},
21+
"keywords": [
22+
"asgardeo",
23+
"web-sdks",
24+
"api-based-auth",
25+
"docs"
26+
],
227
"scripts": {
328
"docs:dev": "vitepress dev src",
429
"docs:build": "vitepress build src",
530
"docs:preview": "vitepress preview src"
631
},
732
"devDependencies": {
833
"vitepress": "^1.2.2"
34+
},
35+
"publishConfig": {
36+
"access": "restricted"
937
}
1038
}

package.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
{
2-
"name": "web-ui-sdks",
2+
"private": true,
3+
"name": "@asgardeo/web-ui-sdks",
34
"version": "0.1.0",
5+
"description": "Web SDKs for building customizable login UIs for Asgardeo & WSO2 Identity Server.",
6+
"author": "WSO2",
47
"license": "Apache-2.0",
8+
"homepage": "https://github.com/asgardeo/web-ui-sdks#readme",
9+
"bugs": {
10+
"url": "https://github.com/asgardeo/web-ui-sdks/issues"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/asgardeo/web-ui-sdks"
15+
},
16+
"keywords": [
17+
"asgardeo",
18+
"web-sdks",
19+
"api-based-auth"
20+
],
521
"scripts": {
622
"build": "nx run-many --target=build --parallel --projects=@asgardeo/js,@asgardeo/react",
723
"changeset": "changeset",
@@ -10,7 +26,6 @@
1026
"test": "nx run-many --target=test --parallel",
1127
"version:packages": "changeset version && pnpm install --lockfile-only"
1228
},
13-
"private": true,
1429
"devDependencies": {
1530
"@changesets/changelog-github": "^0.5.0",
1631
"@changesets/cli": "^2.27.3",
@@ -23,5 +38,8 @@
2338
"engines": {
2439
"node": ">=18",
2540
"pnpm": ">=9"
41+
},
42+
"publishConfig": {
43+
"access": "restricted"
2644
}
2745
}

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
packages:
2+
- "docs"
23
- "packages/*"
34
- "recipes/*"

0 commit comments

Comments
 (0)