Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
/ js-client Public archive

Commit

Permalink
Merge pull request #335 from gravwell/merge-master-1234
Browse files Browse the repository at this point in the history
Prod release
  • Loading branch information
LucasPaganini authored Jun 15, 2022
2 parents 3d59899 + 2e053c6 commit fde69e4
Show file tree
Hide file tree
Showing 70 changed files with 6,052 additions and 52 deletions.
4 changes: 4 additions & 0 deletions .config/license-header.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"eachLine": {
"prepend": " * "
}
},
"md|html": {
"prepend": "<!--",
"append": "-->"
}
},
"defaultFormat": {
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy Docs to GitHub Pages

on:
push:
# Every push on dev will run this action
branches: [dev]

jobs:
build:
runs-on: ubuntu-latest
concurrency: ci-${{github.ref}}
steps:
- name: checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies and generate docs
run: |
npm ci
npx ts-node ./docs-generator/main.ts
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: gh-pages
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ npm-debug.log
yarn-error.log
testem.log
/typings
/docs

# System Files
.DS_Store
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ npm install gravwell
## Contributing

Make sure you understand our [contributing guide](./CONTRIBUTING.md) before doing any work.

## Generating docs

1. First run `npm clean-install`, to install all dependencies;
2. Then run `npm run start:docs`;
3. Then the docs from this project will be generated and served on port 8080;
4. Go to `http://localhost:8080` to see the docs.

> TIP: For a better experience, disable the Browser cache using the network developer tools. Otherwise it will have a delay every time you update the docs.
27 changes: 27 additions & 0 deletions docs-generator/assets/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*************************************************************************
* Copyright 2022 Gravwell, Inc. All rights reserved.
* Contact: <[email protected]>
*
* This software may be modified and distributed under the terms of the
* MIT license. See the LICENSE file for details.
**************************************************************************/

/* Styles for @POST, @GET, @PUT, @DELETE */
dt {
background-color: rgba(255, 229, 157, 1);
color: white;
top: 5px;
left: 5px;
position: relative;
text-transform: uppercase;
}

/* Styles for the endpoint that comes after @POST, @GET, @PUT, @DELETE */
dd {
color: black;
border: 1px solid rgba(255, 229, 157, 1);
border-radius: 4px;
font-weight: bold;
padding: 6px;
background-color: rgba(255, 229, 157, 0.4);
}
91 changes: 91 additions & 0 deletions docs-generator/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*************************************************************************
* Copyright 2022 Gravwell, Inc. All rights reserved.
* Contact: <[email protected]>
*
* This software may be modified and distributed under the terms of the
* MIT license. See the LICENSE file for details.
**************************************************************************/

:root {
--light-hl-0: #000000;
--dark-hl-0: #d4d4d4;
--light-hl-1: #a31515;
--dark-hl-1: #ce9178;
--light-hl-2: #008000;
--dark-hl-2: #6a9955;
--light-hl-3: #af00db;
--dark-hl-3: #c586c0;
--light-hl-4: #795e26;
--dark-hl-4: #dcdcaa;
--light-hl-5: #098658;
--dark-hl-5: #b5cea8;
--light-code-background: #f5f5f5;
--dark-code-background: #1e1e1e;
}

@media (prefers-color-scheme: light) {
:root {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--code-background: var(--light-code-background);
}
}

@media (prefers-color-scheme: dark) {
:root {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--code-background: var(--dark-code-background);
}
}

body.light {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--code-background: var(--light-code-background);
}

body.dark {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--code-background: var(--dark-code-background);
}

.hl-0 {
color: var(--hl-0);
}
.hl-1 {
color: var(--hl-1);
}
.hl-2 {
color: var(--hl-2);
}
.hl-3 {
color: var(--hl-3);
}
.hl-4 {
color: var(--hl-4);
}
.hl-5 {
color: var(--hl-5);
}
pre,
code {
background: var(--code-background);
}
Loading

0 comments on commit fde69e4

Please sign in to comment.