diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 8f0bdb8ef613f1..9b1a771de93d47 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -35,7 +35,7 @@ export default defineConfig({ }, carbonAds: { - carbon: 'CEBIEK3N', + code: 'CEBIEK3N', placement: 'vitejsdev' }, diff --git a/docs/.vitepress/theme/components/AsideSponsors.vue b/docs/.vitepress/theme/components/AsideSponsors.vue new file mode 100644 index 00000000000000..9c90fcca3750a6 --- /dev/null +++ b/docs/.vitepress/theme/components/AsideSponsors.vue @@ -0,0 +1,22 @@ + + + diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index ec9259a0ee08a5..f8d6642180d4ce 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -3,12 +3,14 @@ import Theme from 'vitepress/theme' import './styles/vars.css' import './styles/custom.css' import HomeSponsors from './components/HomeSponsors.vue' +import AsideSponsors from './components/AsideSponsors.vue' export default { ...Theme, Layout() { return h(Theme.Layout, null, { - 'home-features-after': () => h(HomeSponsors) + 'home-features-after': () => h(HomeSponsors), + 'aside-outline-after': () => h(AsideSponsors) }) } } diff --git a/docs/guide/env-and-mode.md b/docs/guide/env-and-mode.md index a0b5400182fe4e..4b37e5549fcd11 100644 --- a/docs/guide/env-and-mode.md +++ b/docs/guide/env-and-mode.md @@ -16,7 +16,7 @@ Vite exposes env variables on the special **`import.meta.env`** object. Some bui During production, these env variables are **statically replaced**. It is therefore necessary to always reference them using the full static string. For example, dynamic key access like `import.meta.env[key]` will not work. -It will also replace these strings appearing in JavaScript strings and Vue templates. This should be a rare case, but it can be unintended. You may see errors like `Missing Semicolon` or `Unexpected token` in this case, for example when `"process.env.NODE_ENV: "` is transformed to `""development": "`. There are ways to work around this behavior: +It will also replace these strings appearing in JavaScript strings and Vue templates. This should be a rare case, but it can be unintended. You may see errors like `Missing Semicolon` or `Unexpected token` in this case, for example when `"process.env.``NODE_ENV"` is transformed to `""development": "`. There are ways to work around this behavior: - For JavaScript strings, you can break the string up with a Unicode zero-width space, e.g. `'import.meta\u200b.env.MODE'`. diff --git a/docs/guide/index.md b/docs/guide/index.md index ab45ceb7f85475..d5d20d80094b1e 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -116,7 +116,7 @@ Running `vite` starts the dev server using the current working directory as root In a project where Vite is installed, you can use the `vite` binary in your npm scripts, or run it directly with `npx vite`. Here are the default npm scripts in a scaffolded Vite project: -```json5 +```json { "scripts": { "dev": "vite", // start dev server, aliases: `vite dev`, `vite serve` diff --git a/docs/index.md b/docs/index.md index 05a85262022650..07a25e6bcbfa59 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,16 @@ --- layout: home +title: Vite +titleTemplate: Next Generation Frontend Tooling + hero: name: Vite text: Next Generation Frontend Tooling tagline: Get ready for a development environment that can finally catch up with you. + image: + light: /vite-splash-light.jpg + dark: /vite-splash-dark.jpg actions: - theme: brand text: Get Started diff --git a/docs/public/vite-splash-dark.jpg b/docs/public/vite-splash-dark.jpg new file mode 100644 index 00000000000000..bda6e66c911b7a Binary files /dev/null and b/docs/public/vite-splash-dark.jpg differ diff --git a/docs/public/vite-splash-light.jpg b/docs/public/vite-splash-light.jpg new file mode 100644 index 00000000000000..a2f936bde14210 Binary files /dev/null and b/docs/public/vite-splash-light.jpg differ diff --git a/package.json b/package.json index 6dde8708780745..58e916c1be3d22 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "typescript": "^4.6.4", "unbuild": "^0.7.4", "vite": "workspace:*", - "vitepress": "1.0.0-draft.4", + "vitepress": "1.0.0-draft.6", "vitest": "^0.12.9", "vue": "^3.2.35" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3a949e094db47..a86744abcf8732 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,7 +64,7 @@ importers: typescript: ^4.6.4 unbuild: ^0.7.4 vite: workspace:* - vitepress: 1.0.0-draft.4 + vitepress: 1.0.0-draft.6 vitest: ^0.12.9 vue: ^3.2.35 devDependencies: @@ -122,7 +122,7 @@ importers: typescript: 4.6.4 unbuild: 0.7.4 vite: link:packages/vite - vitepress: 1.0.0-draft.4 + vitepress: 1.0.0-draft.6 vitest: 0.12.9 vue: 3.2.36 @@ -1626,12 +1626,14 @@ packages: /@cspotcode/source-map-consumer/0.8.0: resolution: {integrity: sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==} engines: {node: '>= 12'} + dev: true /@cspotcode/source-map-support/0.7.0: resolution: {integrity: sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==} engines: {node: '>=12'} dependencies: '@cspotcode/source-map-consumer': 0.8.0 + dev: true /@docsearch/css/3.0.0: resolution: {integrity: sha512-1kkV7tkAsiuEd0shunYRByKJe3xQDG2q7wYg24SOw1nV9/2lwEd4WrUYRJC/ukGTl2/kHeFxsaUvtiOy0y6fFA==} @@ -2121,15 +2123,19 @@ packages: /@tsconfig/node10/1.0.8: resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==} + dev: true /@tsconfig/node12/1.0.9: resolution: {integrity: sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==} + dev: true /@tsconfig/node14/1.0.1: resolution: {integrity: sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==} + dev: true /@tsconfig/node16/1.0.2: resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} + dev: true /@types/argparse/1.0.38: resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} @@ -2711,6 +2717,7 @@ packages: /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} + dev: true /acorn/7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} @@ -2721,6 +2728,7 @@ packages: resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} engines: {node: '>=0.4.0'} hasBin: true + dev: true /add-stream/1.0.0: resolution: {integrity: sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=} @@ -2825,6 +2833,7 @@ packages: /arg/4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: true /arg/5.0.1: resolution: {integrity: sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==} @@ -3613,6 +3622,7 @@ packages: /create-require/1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: true /cross-env/7.0.3: resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} @@ -3858,6 +3868,7 @@ packages: /diff/4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + dev: true /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} @@ -5890,6 +5901,7 @@ packages: /make-error/1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true /map-obj/1.0.1: resolution: {integrity: sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=} @@ -6853,11 +6865,6 @@ packages: engines: {node: '>= 0.8'} dev: false - /prismjs/1.28.0: - resolution: {integrity: sha512-8aaXdYvl1F7iC7Xm1spqSaY/OJBpYW3v+KJ+F17iYxvdc8sfjW194COK5wVhMZX45tGteiBQgdvD/nhxcRwylw==} - engines: {node: '>=6'} - dev: true - /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true @@ -7541,6 +7548,14 @@ packages: resolution: {integrity: sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==} dev: true + /shiki/0.10.1: + resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + dependencies: + jsonc-parser: 3.0.0 + vscode-oniguruma: 1.6.2 + vscode-textmate: 5.2.0 + dev: true + /side-channel/1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -8182,6 +8197,7 @@ packages: make-error: 1.3.6 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + dev: true /tsconfck/2.0.0: resolution: {integrity: sha512-GVDTXF4MdNBBxKfUfjs/wkb7LHd8Ho8WLavESCddTFQFG9AUZOZEm6kODBGmQopQ9OG+EHpkT6dBaIIGhYVt+Q==} @@ -8423,6 +8439,7 @@ packages: /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: true /v8-compile-cache/2.3.0: resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} @@ -8449,9 +8466,9 @@ packages: engines: {node: '>= 0.8'} dev: true - /vitepress/1.0.0-draft.4: - resolution: {integrity: sha512-ViWGXaNFdILpCtC0iOiyNT8zsNYoWZTwZIK7rCrPJWyDD2sIeYuI9uK87pPGJo2XN+OuP7u68Ui86CJRuTtqpw==} - engines: {node: '>=14.0.0'} + /vitepress/1.0.0-draft.6: + resolution: {integrity: sha512-l5V9Z31+D9EBFy4na7aNhAQ4MKRGVuwjBlFKDkY4kSRHPDPUC9XcNbH1mbWepeYaauJc9IDniWj7uVU6ZqJ53g==} + engines: {node: '>=14.6.0'} hasBin: true dependencies: '@docsearch/css': 3.0.0 @@ -8459,7 +8476,7 @@ packages: '@vitejs/plugin-vue': link:packages/plugin-vue '@vueuse/core': 8.5.0_vue@3.2.33 body-scroll-lock: 4.0.0-beta.0 - prismjs: 1.28.0 + shiki: 0.10.1 vite: link:packages/vite vue: 3.2.33 transitivePeerDependencies: @@ -8506,6 +8523,14 @@ packages: engines: {node: '>=0.10.0'} dev: true + /vscode-oniguruma/1.6.2: + resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} + dev: true + + /vscode-textmate/5.2.0: + resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + dev: true + /vue-demi/0.12.5_vue@3.2.33: resolution: {integrity: sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==} engines: {node: '>=12'} @@ -8742,6 +8767,7 @@ packages: /yn/3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} + dev: true /youch/2.2.2: resolution: {integrity: sha512-/FaCeG3GkuJwaMR34GHVg0l8jCbafZLHiFowSjqLlqhC6OMyf2tPJBu8UirF7/NI9X/R5ai4QfEKUCOxMAGxZQ==}