release: v0.15.8

This commit is contained in:
YunYouJun 2023-10-22 00:38:45 +08:00
parent c285d80795
commit c0b8f75387
7 changed files with 33 additions and 7 deletions

View File

@ -35,3 +35,29 @@ end: false
pnpm create valaxy
# choose template addon
```
### 使用生命周期钩子
如示例所示,插件可以使用 `valaxy.hook` 来挂载生命周期钩子。
实现在构建前/后以及其他节点做一些事情。
> 请参考 [生命周期钩子](/guide/custom/hooks) 了解更多。
```ts {11-14}
import { defineValaxyAddon } from 'valaxy'
import consola from 'consola'
import pkg from '../package.json'
export const addonTest = defineValaxyAddon(options => ({
name: pkg.name,
enable: true,
options,
setup(valaxy) {
valaxy.hook('build:before', () => {
// do something before build
consola.log('build:before')
})
},
}))
```

View File

@ -1,7 +1,7 @@
{
"name": "@valaxyjs/monorepo",
"type": "module",
"version": "0.15.7",
"version": "0.15.8",
"private": true,
"packageManager": "pnpm@8.9.2",
"description": "📄 Vite & Vue powered static blog generator.",

View File

@ -1,7 +1,7 @@
{
"name": "create-valaxy",
"type": "module",
"version": "0.15.7",
"version": "0.15.8",
"description": "Create Starter Template for Valaxy",
"author": {
"email": "me@yunyoujun.cn",

View File

@ -12,8 +12,8 @@
"serve": "vite preview"
},
"dependencies": {
"valaxy": "0.15.7",
"valaxy-theme-yun": "0.15.7"
"valaxy": "0.15.8",
"valaxy-theme-yun": "0.15.8"
},
"devDependencies": {
"typescript": "^5.2.2"

View File

@ -1,6 +1,6 @@
{
"name": "valaxy-theme-press",
"version": "0.15.7",
"version": "0.15.8",
"description": "Docs Theme for Valaxy",
"author": {
"email": "me@yunyoujun.cn",

View File

@ -1,6 +1,6 @@
{
"name": "valaxy-theme-yun",
"version": "0.15.7",
"version": "0.15.8",
"author": {
"email": "me@yunyoujun.cn",
"name": "YunYouJun",

View File

@ -1,7 +1,7 @@
{
"name": "valaxy",
"type": "module",
"version": "0.15.7",
"version": "0.15.8",
"description": "📄 Vite & Vue powered static blog generator.",
"author": {
"email": "me@yunyoujun.cn",