Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Majid committed Mar 23, 2024
1 parent 2e212a5 commit 0a7d570
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 34 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,44 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20.x
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
registry-url: https://registry.npmjs.org/
cache: 'npm'
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- uses: mymindstorm/setup-emsdk@v11
- name: Verify emcc
run: emcc -v
- name: Verify Node
run: npm -v


# publish-npm:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# registry-url: https://registry.npmjs.org/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Create local changes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
npm run publish:patch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- run: git pull --rebase
- run: yarn install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
13 changes: 7 additions & 6 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ import { defineConfig } from 'vitepress'
import typedocSidebar from '../api/typedoc-sidebar.json';


const sidebarModified= typedocSidebar.map((groups)=>{
const items= groups.items.map((item)=>{
const sidebarModified = typedocSidebar.map((groups) => {
const items = groups.items.map((item) => {

return {...item, link:item.link.replace('/docs','')}
return { ...item, link: item.link.replace('/docs', '') }
})
return {...groups, items}
return { ...groups, items }
})

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "WebDggrid",
description: "A webassembely version of DGGRID",
base:"/webDggrid/",
base: "/webDggrid/",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'API', link: '/api/' }
{ text: 'API', link: '/api/' },
{ text: 'Demo', link: 'example.html' }
],

sidebar: [
Expand Down
File renamed without changes.
37 changes: 27 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webdggrid",
"version": "1.0.0",
"version": "1.0.1",
"description": "Wasm package for DGGRID ",
"type": "module",
"exports": {
Expand All @@ -24,22 +24,28 @@
"files": [
"dist/*.*",
"types/*",
"src-ts/*.css"
"src-ts/*",
"lib-wasm/*",
"lib-esm/*"
],
"scripts": {
"prebuild": "node ./utils/Make",
"build": "npm run build:types && npm run build:sfx && npm run bundle",
"build": "yarn build:types && yarn build:sfx && yarn bundle",
"build:types": "tsc",
"build:sfx": "node ./utils/sfx-wasm",
"bundle": "rollup -c",
"lint": "eslint src-ts/**/*.ts",
"prettier": "prettier --config .prettierrc --write .",
"test": "vitest --watch",
"test:run": "vitest run",
"docs:dev": "npm run publish-typedoc && vitepress dev docs",
"docs:build": "npm run publish-typedoc && vitepress build docs",
"docs:preview": "npm run publish-typedoc && vitepress preview docs",
"publish-typedoc": "typedoc --options typedoc.json"
"test": "vitest",
"docs:dev": "yarn publish-typedoc && vitepress dev docs",
"docs:build": "yarn publish-typedoc && vitepress build docs",
"publish-typedoc": "typedoc --options typedoc.json",
"publish:patch": "yarn version patch",
"publish:minor": "yarn version minor",
"publish:major": "yarn version major",
"preversion": "yarn install && yarn test",
"version": "yarn build && yarn docs:build && git add -A dist docs types",
"postversion": "echo postversion"
},
"repository": {
"type": "git",
Expand All @@ -50,7 +56,18 @@
"DGGS",
"GIS"
],
"author": "Majid Hojati",
"maintainers": [
{
"name": "Majid Hojati",
"email": "hoja4090@mylaureir.ca",
"url": "https://github.com/am2222"
}
],
"author": {
"name": "Majid Hojati",
"email": "hoja4090@mylaureir.ca",
"url": "https://github.com/am2222"
},
"license": "ISC",
"bugs": {
"url": "https://github.com/am2222/webDggrid/issues"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit 0a7d570

Please sign in to comment.