Skip to content

Commit

Permalink
Dev (#1)
Browse files Browse the repository at this point in the history
* Added examples for useBool

* fuel => atomic-fuel

* Docs publishing with workflow

* updated docs baseUrl

* Testing test failure

* Docs updates

* Excluded other docs from storybook's build process

* exclude elements own docs from it's storybook
  • Loading branch information
seanrcollings authored Nov 15, 2024
1 parent a1b8302 commit 05cd6b3
Show file tree
Hide file tree
Showing 191 changed files with 2,751 additions and 34 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get tags
run: git fetch --tags origin
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: Install dependencies
run: yarn ci
- name: Build Storybook
run: yarn docs:build ${{ steps.get_tag.outputs.TAG }}
- name: Deploy Docs to GitHub Pages
node-version: "18.16.0"

- name: Install Node.js dependencies
run: npm install

- name: Build
run: npm run build --workspaces

- name: Build docs
run: npm run docs:build

- name: Publish Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
commit_message: ${{ steps.get_tag.outputs.TAG }}
keep_files: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
run: npm run build --workspaces

- name: Run tests
run: npm run test --workspaces
run: npm run test --workspaces --if-present
4 changes: 2 additions & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: [
"../packages/**/*.mdx",
"../packages/**/*.stories.@(js|jsx|ts|tsx)",
"../packages/atomic-elements/src/**/*.mdx",
"../packages/atomic-elements/**/*.stories.@(js|jsx|ts|tsx)",
],

addons: [
Expand Down
9 changes: 5 additions & 4 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import type { Config } from "@docusaurus/types";

const config: Config = {
title: "Atomic Libs",
url: "https://your-site.com",
baseUrl: "/",
url: "https://atomicjolt.github.io",
baseUrl: "/atomic-libs/",
trailingSlash: false,
favicon: "favicon.svg",
organizationName: "atomicjolt", // GitHub org/user name
projectName: "atomic-libs", // Repo name
organizationName: "atomicjolt",
projectName: "atomic-libs",
staticDirectories: ["../public"],
onBrokenLinks: "log",
presets: [
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"workspaces": [
"packages/atomic-elements",
"packages/fuel",
"packages/atomic-fuel",
"packages/hooks",
"packages/forms",
"packages/lti-types",
Expand All @@ -16,15 +16,16 @@
"playground": "vite --config playground/vite.config.ts dev",
"storybook:dev": "storybook dev -p 6006 ",
"storybook:cssprops": "python3 bin/update-css-props.py",
"storybook:build": "yarn storybook:cssprops && storybook build -o docs/build/storybook",
"storybook:publish": "yarn storybook:build ${0} && gh-pages -d docs -m ${0}",
"storybook:publish:next": "yarn storybook:build next && gh-pages -d docs/next -m next -e next",
"storybook:build": "npm run storybook:cssprops && storybook build -o docs/build/storybook",
"storybook:publish": "npm run storybook:build ${0} && gh-pages -d docs -m ${0}",
"storybook:publish:next": "npm run storybook:build next && gh-pages -d docs/next -m next -e next",
"docusaurus:start": "docusaurus start docs",
"docusaurus:build": "docusaurus build docs",
"docusaurus:serve": "docusaurus serve docs",
"docs:start": "npm run docusaurus:start",
"docs:build": "npm run docusaurus:build && npm run storybook:build",
"docs:serve": "npm run docusaurus:serve"
"docs:serve": "npm run docusaurus:serve",
"docs:publish": "gh-pages -d docs/build -f"
},
"dependencies": {
"@docusaurus/core": "^3.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/atomic-elements/docs/Index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ which provides a set of hooks and components for building accessible UIs.

## Links

- [Storybook](/storybook/)
- <a href="https://atomicjolt.github.io/atomic-libs/storybook/" target="_blank">Storybook</a>
- [Source Code](https://github.com/atomicjolt/atomic-elements)
- [NPM Package](https://www.npmjs.com/package/@atomicjolt/atomic-elements)

Expand Down
2 changes: 1 addition & 1 deletion packages/atomic-elements/docs/Storybook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 3

# Using Storybook

[Storybook Site](/storybook/)
- <a href="https://atomicjolt.github.io/atomic-libs/storybook/" target="_blank">Storybook Site</a>

Storybook is a tool for UI development. It makes development faster and easier by isolating components.
This allows you to work on one component at a time. You can develop entire UIs without needing to start up
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions packages/atomic-fuel/libs/actions/errors.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export function clearErrors(): {
type: any;
};
export function addError(error: any, message: any, context: any): {
type: any;
payload: {
error: any;
message: any;
context: any;
};
};
export const Constants: any;
34 changes: 34 additions & 0 deletions packages/atomic-fuel/libs/actions/errors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/atomic-fuel/libs/actions/errors.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/atomic-fuel/libs/actions/jwt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function refreshJwt(userId: any): {
type: any;
method: string;
url: string;
};
export const Constants: any;
24 changes: 24 additions & 0 deletions packages/atomic-fuel/libs/actions/jwt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/atomic-fuel/libs/actions/jwt.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions packages/atomic-fuel/libs/actions/modal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const Constants: any;
export function openModal(modalName: any): {
type: any;
modalName: any;
};
export function closeModal(): {
type: any;
};
18 changes: 18 additions & 0 deletions packages/atomic-fuel/libs/actions/modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/atomic-fuel/libs/actions/modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/atomic-fuel/libs/actions/post_message.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const Constants: any;
export function postMessage(message: any, broadcast?: boolean): {
type: any;
postMessage: boolean;
broadcast: boolean;
message: any;
};
22 changes: 22 additions & 0 deletions packages/atomic-fuel/libs/actions/post_message.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/atomic-fuel/libs/actions/post_message.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions packages/atomic-fuel/libs/api/api.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default class Api {
static get(url: any, apiUrl: any, jwt: any, csrf: any, params: any, headers: any, timeout?: number): any;
static post(url: any, apiUrl: any, jwt: any, csrf: any, params: any, body: any, headers: any, timeout?: number): any;
static put(url: any, apiUrl: any, jwt: any, csrf: any, params: any, body: any, headers: any, timeout?: number): any;
static del(url: any, apiUrl: any, jwt: any, csrf: any, params: any, headers: any, timeout?: number): any;
static execRequest(method: any, url: any, apiUrl: any, jwt: any, csrf: any, params: any, body: any, headers: any, timeout?: number): any;
/**
* Returns a complete, absolute URL by conditionally appending `path` to
* `apiUrl`. If `path` already contains "http", it is returned as-is.
*/
static makeUrl(part: any, apiUrl: any): any;
static doRequest(url: any, requestMethod: any, requestType: any): any;
static wrapRequest(url: any, requestMethod: any, requestType: any): any;
static disposeRequest(url: any): void;
static promisify(request: any): Promise<any>;
static queryStringFrom(params: any): string;
}
Loading

0 comments on commit 05cd6b3

Please sign in to comment.