Skip to content

Commit

Permalink
Merge pull request #274 from Tresjs/bugfix/clean-up-local-and-fix-docs
Browse files Browse the repository at this point in the history
fix: clean up local and fix docs
  • Loading branch information
alvarosabu authored May 20, 2023
2 parents 30bb5db + e35921f commit 7bc558e
Show file tree
Hide file tree
Showing 13 changed files with 296 additions and 4,221 deletions.
10 changes: 0 additions & 10 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ import 'uno.css'
// .vitepress/theme/index.ts
import DefaultTheme from 'vitepress/theme'
import './config.css'
import FirstScene from './components/FirstScene.vue'

import StackBlitzEmbed from './components/StackBlitzEmbed.vue'
import EmbedExperiment from './components/EmbedExperiment.vue'
import DonutExample from './components/DonutExample.vue'

import TresLayout from './TresLayout.vue'

Expand All @@ -26,11 +21,6 @@ export default {

enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx)
ctx.app.component('FirstScene', FirstScene)
ctx.app.component('StackBlitzEmbed', StackBlitzEmbed)
ctx.app.component('EmbedExperiment', EmbedExperiment)
ctx.app.component('DonutExample', DonutExample)

/* ctx.app.use(plausible) */
},
Layout: TresLayout,
Expand Down
22 changes: 22 additions & 0 deletions docs/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

export {}

declare module '@vue/runtime-core' {
export interface GlobalComponents {
DonutExample: typeof import('./.vitepress/theme/components/DonutExample.vue')['default']
EmbedExperiment: typeof import('./.vitepress/theme/components/EmbedExperiment.vue')['default']
ExtendExample: typeof import('./.vitepress/theme/components/ExtendExample.vue')['default']
FirstScene: typeof import('./.vitepress/theme/components/FirstScene.vue')['default']
FirstSceneLightToon: typeof import('./.vitepress/theme/components/FirstSceneLightToon.vue')['default']
LoveVueThreeJS: typeof import('./.vitepress/theme/components/LoveVueThreeJS.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
StackBlitzEmbed: typeof import('./.vitepress/theme/components/StackBlitzEmbed.vue')['default']
}
}
14 changes: 13 additions & 1 deletion docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { defineConfig } from 'vite'
import Unocss from 'unocss/vite'
import svgLoader from 'vite-svg-loader'
import Components from 'unplugin-vue-components/vite'

export default defineConfig({
plugins: [svgLoader(), Unocss()],
plugins: [
svgLoader(),
Unocss(),
Components({
// allow auto load markdown components under `.vitepress/theme/components`
dirs: ['.vitepress/theme/components'],
extensions: ['vue', 'md'],
// allow auto import and register components used in markdown
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
dts: 'components.d.ts',
}),
],
})
13 changes: 0 additions & 13 deletions index.html

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
"threejs-vue"
],
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"playground": "cd playground && npm run dev",
"test": "vitest",
"test:ci": "vitest run",
Expand Down
1 change: 1 addition & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@tresjs/cientos": "2.0.0",
"vue-router": "^4.2.0"
},
"devDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true
"noEmit": true,
"paths": {
"@tresjs/core": ["../dist/"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "auto-imports.d.ts", "components.d.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
5 changes: 1 addition & 4 deletions playground/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"paths": {
"@tresjs/core": ["../src/index.ts"]
},
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
Loading

0 comments on commit 7bc558e

Please sign in to comment.