Skip to content

Commit

Permalink
feat: vitebook
Browse files Browse the repository at this point in the history
  • Loading branch information
logustra committed Mar 28, 2022
1 parent 09a5087 commit 19a8b1b
Show file tree
Hide file tree
Showing 36 changed files with 788 additions and 55 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vitebook/.cache
.vitebook/.temp
coverage
dist
node_modules
Expand Down
15 changes: 15 additions & 0 deletions .vitebook/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<component :is="component" />
</template>

<script lang="ts">
import type { App, Component } from 'vue';
export async function configureApp(app: App) {}
</script>

<script setup lang="ts">
const { component } = defineProps<{
component: Component;
}>();
</script>
46 changes: 46 additions & 0 deletions .vitebook/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import vue from '@vitejs/plugin-vue';
import { defineConfig, clientPlugin } from '@vitebook/client/node';
import { vuePlugin } from '@vitebook/vue/node';
import { vueMarkdownPlugin } from '@vitebook/markdown-vue/node';
import { shikiMarkdownPlugin } from '@vitebook/markdown-shiki/node';
import {
DefaultThemeConfig,
defaultThemePlugin,
} from '@vitebook/theme-default/node';

export default defineConfig<DefaultThemeConfig>({
include: [
'src/components/**/**/*.md',
'src/components/**/**/*.story.vue',
'src/modules/**/**/**/*.md',
'src/modules/**/**/**/*.story.vue',
'src/styles/**/*.md',
],
/**
* DESC:
* override vite.config.ts
*/
vite: {
plugins: [],
optimizeDeps: {},
build: {},
test: {}
},
plugins: [
shikiMarkdownPlugin(),
vueMarkdownPlugin(),
vuePlugin({ appFile: 'app.vue' }),
clientPlugin(),
defaultThemePlugin(),
vue({ include: /\.(md|vue)/ }),
],
site: {
title: 'Vivu',
description: 'Opinionated scalable vue boilerplate using vite.',
theme: {
remoteGitRepo: {
url: 'logustra/vivu',
},
},
},
});
18 changes: 18 additions & 0 deletions .vitebook/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="generator" content="vitebook@{{ version }}" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/manifest.json" />
<!--@vitebook/head-->
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"><!--@vitebook/app--></div>
<!--@vitebook/body-->
</body>
</html>
5 changes: 5 additions & 0 deletions .vitebook/public/404.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .vitebook/public/apple-touch-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .vitebook/public/favicon-16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .vitebook/public/favicon-32x32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .vitebook/public/favicon.ico
Binary file not shown.
Binary file added .vitebook/public/logo-192x192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .vitebook/public/logo-512x512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions .vitebook/public/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions .vitebook/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"short_name": "Vitebook",
"name": "Vitebook Site",
"icons": [
{
"src": "logo-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#ffc107",
"background_color": "#212121"
}
3 changes: 3 additions & 0 deletions .vitebook/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
3 changes: 3 additions & 0 deletions .vitebook/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Theme from '@vitebook/theme-default';

export default Theme;
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"serve": "vite preview",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "pnpm clean:coverage && vitest --coverage --mode test"
"test": "pnpm clean:coverage && vitest --coverage --mode test",
"book:dev": "vitebook dev",
"book:build": "vitebook build",
"book:preview": "vitebook preview"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -82,13 +85,21 @@
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@testing-library/vue": "^6.5.0",
"@types/node": "^17.0.23",
"@vitebook/client": "^0.23.4",
"@vitebook/core": "^0.23.4",
"@vitebook/markdown-shiki": "^0.23.4",
"@vitebook/markdown-vue": "^0.23.4",
"@vitebook/theme-default": "^0.23.4",
"@vitebook/vue": "^0.23.4",
"c8": "^7.11.0",
"chalk": "^4.1.2",
"commander": "^7.2.0",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.11.0",
"happy-dom": "^2.50.0",
"svelte": "^3.46.4",
"vitest": "^0.7.11"
},
"volta": {
Expand Down

0 comments on commit 19a8b1b

Please sign in to comment.