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

feat: add playground and cli packages #11

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./docs/.vitepress/dist
publish_dir: ./docs/dist
cname: slithe.cadgerfeast.dev
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules
/.nx/
/node_modules/
/.npmrc
3 changes: 1 addition & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/.vitepress/cache
/.vitepress/dist
/dist
/node_modules
10 changes: 10 additions & 0 deletions docs/.slithe/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { definePlaygroundClient } from '@slithe/playground/client';
import { setTheme } from 'slithe';
import primer from '@slithe/primer';
import '@slithe/primer/global.css';

export const playground = definePlaygroundClient({
setTheme: (theme) => {
setTheme(theme, primer);
}
});
61 changes: 61 additions & 0 deletions docs/.slithe/node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { definePlaygroundNode } from '@slithe/playground/node';

export const playground = definePlaygroundNode({
nav: () => {
return [
{
text: 'Guide',
link: '/guide/getting-started',
activeMatch: '/guide/'
},
{
text: 'Links',
items: [
{
text: 'Contributing',
link: 'https://github.com/cadgerfeast/slithe/blob/main/CONTRIBUTING.md'
},
{
text: 'Changelog',
link: 'https://github.com/cadgerfeast/slithe/blob/main/CHANGELOG.md'
}
]
}
];
},
socialLinks: () => {
return [
{ icon: 'github', link: 'https://github.com/cadgerfeast/slithe' }
];
},
sidebar: (defaultSidebar) => {
defaultSidebar['/guide/'] = [
{
text: 'Introduction',
collapsed: false,
items: [
{ text: 'Getting Started', link: '/guide/getting-started' }
]
},
...defaultSidebar['/guide/'],
{
text: 'API',
collapsed: false,
items: [
{ text: 'addNotification', link: '/guide/api/add-notification' },
{ text: 'attachTooltip', link: '/guide/api/attach-tooltip' },
{ text: 'setConfig', link: '/guide/api/set-config' },
{ text: 'setTheme', link: '/guide/api/set-theme' }
]
},
{
text: 'Themes',
collapsed: false,
items: [
{ text: 'Primer', link: '/guide/themes/primer' }
]
}
];
return defaultSidebar;
}
});
File renamed without changes.
121 changes: 0 additions & 121 deletions docs/.vitepress/config.ts

This file was deleted.

12 changes: 5 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
"dev": "slithe playground dev",
"build": "slithe playground build",
"preview": "slithe playground preview"
},
"devDependencies": {
"@slithe/playground": "*",
"@slithe/primer": "*",
"@slithe/vue": "*",
"slithe": "*",
"vitepress": "^1.3.2",
"vue": "^3.4.13"
"slithe": "*"
}
}
11 changes: 0 additions & 11 deletions docs/src/api.ts

This file was deleted.

20 changes: 0 additions & 20 deletions docs/src/guide/api/add-notification.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/src/guide/themes/pixel.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/src/public/iframe.html

This file was deleted.

15 changes: 0 additions & 15 deletions docs/tsconfig.json

This file was deleted.

5 changes: 3 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"parallel": 7,
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
Expand All @@ -8,8 +10,7 @@
"build",
"test",
"lint"
],
"parallel": 7
]
}
}
},
Expand Down
Loading