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

docs: move to vitepress #71

Merged
merged 6 commits into from
Sep 15, 2022
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
11 changes: 7 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,23 @@
"camelcase": "warn",
"require-atomic-updates": "off",
"prefer-destructuring": ["warn", {
"array": false,
"object": true
"AssignmentExpression": { "object": false, "array": false },
"VariableDeclarator": { "object": true, "array": true }
}, {
"enforceForRenamedProperties": false
}],
"security/detect-object-injection": "off",
"object-curly-spacing": ["warn", "always"],
"prefer-const": ["warn"]
"prefer-const": ["warn"],
"@typescript-eslint/consistent-type-imports": ["warn", { "prefer": "type-imports" }]
},
"overrides": [
{
"files": ["test/**/*.ts"],
"rules": {
"@typescript-eslint/ban-ts-comment": ["off"]
"@typescript-eslint/ban-ts-comment": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-unused-vars": ["off"]
}
}
]
Expand Down
21 changes: 10 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// Place your settings in this file to overwrite default and user settings.
{
"search.exclude": {
"**/node_modules": true,
"**/public": true,
"**/package-lock.json": true
},
"workbench.colorCustomizations": {
"activityBar.background": "#29b757",
"titleBar.activeBackground": "#29b757",
"titleBar.activeForeground": "#FAFBF4"
}
"search.exclude": {
"**/node_modules": true,
"**/public": true,
"**/package-lock.json": true
},
"workbench.colorCustomizations": {
"activityBar.background": "#29b757",
"titleBar.activeBackground": "#29b757",
"titleBar.activeForeground": "#FAFBF4"
}
}
56 changes: 56 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { defineConfig } from "vitepress"

export default defineConfig({
title: 'feathers-casl',
description: 'Add access control with CASL to your feathers application',
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
themeConfig: {
logo: '/img/logo.svg',
editLink: { pattern: 'https://github.com/fratzinger/feathers-casl/edit/master/docs/:path', text: 'Edit this page on GitHub' },
lastUpdatedText: 'Last Updated',
socialLinks: [
{ icon: 'github', link: 'https://github.com/fratzinger/feathers-casl' }
],
sidebar: [
{
text: 'Guide',
items: [
{ text: 'Getting Started', link: '/getting-started' },
{ text: 'Hooks', link: '/hooks' },
{ text: 'Channels', link: '/channels' },
{ text: 'Utils', link: '/utils' },
{ text: 'Client Side', link: '/client-side' },
{ text: 'Gotchas', link: '/gotchas' },
{ text: 'Cookbook', link: '/cookbook' }
]
}
],
nav: [

{
text: 'Ecosystem',
items: [
{
text: 'www.feathersjs.com',
link: 'https://feathersjs.com/'
}, {
text: "Feathers Github Repo",
link: "https://github.com/feathersjs/feathers"
}, {
text: 'Awesome Feathersjs',
link: 'https://github.com/feathersjs/awesome-feathersjs'
}
]
}
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2020-present Frederik Schmatz'
},
algolia: {
appId: 'XJKV0V1N7U',
apiKey: 'a4c3e7c6c2fcd7b1baa2ac04e17b9f72',
indexName: 'feathers-casl'
}
}
});
120 changes: 120 additions & 0 deletions docs/.vitepress/style/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
:root {
// brand colors
--c-brand: #29b757;
--c-brand-light: #3ec96a;

// background colors
--c-bg: #ffffff;
--c-bg-light: #f3f4f5;
--c-bg-lighter: #eeeeee;
--c-bg-navbar: var(--c-bg);
--c-bg-sidebar: var(--c-bg);
--c-bg-arrow: #cccccc;

// text colors
--c-text: #2c3e50;
--c-text-accent: var(--c-brand);
--c-text-light: #3a5169;
--c-text-lighter: #4e6e8e;
--c-text-lightest: #6a8bad;
--c-text-quote: #999999;

// border colors
--c-border: #eaecef;
--c-border-dark: #dfe2e5;

// custom container colors
--c-tip: #42b983;
--c-tip-bg: var(--c-bg-light);
--c-tip-title: var(--c-text);
--c-tip-text: var(--c-text);
--c-tip-text-accent: var(--c-text-accent);
--c-warning: #e7c000;
--c-warning-bg: #fffae3;
--c-warning-title: #ad9000;
--c-warning-text: #746000;
--c-warning-text-accent: var(--c-text);
--c-danger: #cc0000;
--c-danger-bg: #ffe0e0;
--c-danger-title: #990000;
--c-danger-text: #660000;
--c-danger-text-accent: var(--c-text);
--c-details-bg: #eeeeee;

// badge component colors
--c-badge-tip: var(--c-tip);
--c-badge-warning: var(--c-warning);
--c-badge-danger: var(--c-danger);

// transition vars
--t-color: 0.3s ease;
--t-transform: 0.3s ease;

// code blocks vars
--code-bg-color: #282c34;
--code-hl-bg-color: rgba(0, 0, 0, 0.66);
--code-ln-color: #9e9e9e;
--code-ln-wrapper-width: 3.5rem;

// font vars
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
--font-family-code: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;

// layout vars
--navbar-height: 3.6rem;
--navbar-padding-v: 0.7rem;
--navbar-padding-h: 1.5rem;
--sidebar-width: 20rem;
--sidebar-width-mobile: calc(var(--sidebar-width) * 0.82);
--content-width: 740px;
--homepage-width: 960px;
}

html.dark {
// brand colors
--c-brand: #29b757;
--c-brand-light: #3ec96a;

// background colors
--c-bg: #22272e;
--c-bg-light: #2b313a;
--c-bg-lighter: #262c34;

// text colors
--c-text: #adbac7;
--c-text-light: #96a7b7;
--c-text-lighter: #8b9eb0;
--c-text-lightest: #8094a8;

// border colors
--c-border: #3e4c5a;
--c-border-dark: #34404c;

// custom container colors
--c-tip: #318a62;
--c-warning: #ceab00;
--c-warning-bg: #7e755b;
--c-warning-title: #ceac03;
--c-warning-text: #362e00;
--c-danger: #940000;
--c-danger-bg: #806161;
--c-danger-title: #610000;
--c-danger-text: #3a0000;
--c-details-bg: #323843;

// code blocks vars
--code-hl-bg-color: #363b46;
}

// plugin-docsearch
html.dark .DocSearch {
--docsearch-logo-color: var(--c-text);
--docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309;
--docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d,
0 2px 2px 0 rgba(3, 4, 9, 0.3);
--docsearch-key-gradient: linear-gradient(-225deg, #444950, #1c1e21);
--docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5),
0 -4px 8px 0 rgba(0, 0, 0, 0.2);
}

43 changes: 0 additions & 43 deletions docs/.vuepress/config.ts

This file was deleted.

Loading