Skip to content

Commit

Permalink
chore: docs moved outside of package dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Nov 27, 2022
1 parent 2361ddd commit fcacbab
Show file tree
Hide file tree
Showing 187 changed files with 580 additions and 334 deletions.
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ignore-workspace-root-check=true
shamefully-hoist=true
strict-peer-dependencies=false
auto-install-peers=true
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
// Extention: Code Spell Checker
"cSpell.words": [
"composables",
"Vite"
"Vite",
"vitepress"
],
// Extension: UnoCSS
"unocss.root": "packages/documentation",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { fileURLToPath } from 'url'
import Container from 'markdown-it-container'
import Unocss from 'unocss/vite'
import type { DefaultTheme } from 'vitepress'
import { defineConfig } from 'vitepress'

const nav = [
const nav: DefaultTheme.Config['nav'] = [
{
text: 'Development',
items: [
Expand Down Expand Up @@ -122,12 +123,12 @@ export default defineConfig({
vite: {
plugins: [
Unocss({
configFile: '../../unocss.config.ts',
configFile: '../../uno.config.ts',
}),
],
resolve: {
alias: {
'@anu-vue': fileURLToPath(new URL('../../../anu-vue/', import.meta.url)),
'@anu-vue': fileURLToPath(new URL('../../packages/anu-vue', import.meta.url)),
},
},
},
Expand Down
5 changes: 5 additions & 0 deletions docs/.vitepress/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/documentation/package.json → docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"main": "index.js",
"private": true,
"scripts": {
"dev": "vitepress dev docs",
"build": "vitepress build docs",
"serve": "vitepress serve docs"
"dev": "vitepress dev",
"build": "vitepress build",
"serve": "vitepress serve"
},
"keywords": [],
"author": "",
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
25 changes: 25 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"baseUrl": ".",
"resolveJsonModule": true,
"esModuleInterop": true,
"types": [
"anu-vue/volar"
],
"paths": {
"@anu-vue/*": [
"../packages/anu-vue/*"
]
}
},
"exclude": [
"**/dist/**"
],
"include": [
"**/*.ts",
"**/*.d.ts",
"**/*.vue",
"**/*.md",
".vitepress/shims.d.ts"
]
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const extractFileNameFromPath = path => path.split('/').at(-1).split('.')[0]
export const extractFileNameFromPath = (path: string) => path.split('/').at(-1).split('.')[0]

export const extractFileNameFromGlobImport = demos => {
export const extractFileNameFromGlobImport = (demos: string[]) => {
const names = []
for (const path in demos) names.push(extractFileNameFromPath(path))

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"main": "index.js",
"private": true,
"scripts": {
"dev": "nr --filter anu-vue dev",
"build": "nr --filter anu-vue build",
"docs:dev": "nr --filter @anu-vue/documentation dev",
"docs:build": "nr --filter anu-vue build && nr --filter @anu-vue/documentation build",
"dev": "pnpm --filter anu-vue dev",
"build": "pnpm --filter anu-vue build",
"docs:dev": "pnpm --filter @anu-vue/documentation dev",
"docs:build": "pnpm --filter anu-vue build && pnpm --filter @anu-vue/documentation build",
"clean": "rimraf packages/anu-vue/dist && rimraf packages/anu-nuxt/dist",
"release": "bumpp package.json packages/anu-vue/package.json --execute 'nr --filter anu-vue build' && na --filter anu-vue publish --no-git-checks",
"lint": "nr --filter anu-vue lint",
"release": "bumpp package.json packages/anu-vue/package.json --execute 'pnpm --filter anu-vue build' && na --filter anu-vue publish --no-git-checks",
"lint": "pnpm --filter anu-vue lint",
"update:deps": "taze -r -w"
},
"keywords": [],
Expand Down
4 changes: 2 additions & 2 deletions packages/anu-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
],
"types": "./dist/types",
"scripts": {
"dev": "nr gen-comp-meta && vite build --watch",
"dev": "pnpm gen-comp-meta && vite build --watch",
"gen-comp-meta": "na tsx ../../scripts/gen-component-meta.ts",
"build": "nr gen-comp-meta && vite build",
"build": "pnpm gen-comp-meta && vite build",
"preview": "vite preview",
"lint": "eslint . --fix"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/anu-vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"path": "./tsconfig.node.json"
}
]
}
}
12 changes: 0 additions & 12 deletions packages/documentation/archive.md

This file was deleted.

7 changes: 0 additions & 7 deletions packages/documentation/jsconfig.json

This file was deleted.

Loading

0 comments on commit fcacbab

Please sign in to comment.