mirror of https://github.com/vuejs/vitepress
commit
9069e4673b
@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
dist
|
||||
TODOs.md
|
||||
playground
|
||||
*.log
|
||||
test/temp
|
@ -0,0 +1,4 @@
|
||||
semi: false
|
||||
singleQuote: true
|
||||
printWidth: 80
|
||||
trailingComma: none
|
@ -0,0 +1,7 @@
|
||||
## Problems to Fix
|
||||
|
||||
- Should not require vue-router
|
||||
- Should not require chunk metadata for each page
|
||||
- Should only inline site metadata that is used in runtime code (detect via proxy created with `useSiteData()`)
|
||||
- Should use stringified site metadata
|
||||
- i18n data should be fetched on demand
|
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('../dist')
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "vitepress",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"bin": {
|
||||
"vitepress": "bin/vitepress.js"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "tsc -w -p ."
|
||||
},
|
||||
"keywords": [
|
||||
"vite",
|
||||
"vuepress"
|
||||
],
|
||||
"author": "Evan You",
|
||||
"license": "MIT",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"typescript": "^3.8.3"
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import { createServer, Plugin } from 'vite'
|
||||
import path from 'path'
|
||||
import { promises as fs } from 'fs'
|
||||
|
||||
const indexTemplate = fs.readFile(path.join(__dirname, '../theme/index.html'))
|
||||
|
||||
const VitePressPlugin: Plugin = ({ root, app }) => {
|
||||
app.use(async (ctx, next) => {
|
||||
// redirect request to index.html
|
||||
if (ctx.path === '/index.html') {
|
||||
ctx.body = await indexTemplate
|
||||
return
|
||||
}
|
||||
|
||||
return next()
|
||||
})
|
||||
|
||||
app.use(async (ctx, next) => {})
|
||||
}
|
||||
|
||||
createServer({
|
||||
plugins: [VitePressPlugin]
|
||||
}).listen(3000, () => {
|
||||
console.log('listening on http://localhost:3000')
|
||||
})
|
@ -0,0 +1 @@
|
||||
hello!
|
@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"outDir": "./dist",
|
||||
"module": "commonjs",
|
||||
"lib": ["ESNext"],
|
||||
"sourceMap": false,
|
||||
"target": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"declaration": true,
|
||||
"allowJs": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noUnusedLocals": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"removeComments": false,
|
||||
"preserveSymlinks": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
typescript@^3.8.3:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
|
Loading…
Reference in new issue