Skip to content

Commit

Permalink
release: v0.15.8
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Oct 21, 2023
1 parent c285d80 commit c0b8f75
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 7 deletions.
26 changes: 26 additions & 0 deletions docs/pages/addons/write.md
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
},
}))
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@valaxyjs/monorepo",
"type": "module",
"version": "0.15.7",
"version": "0.15.8",
"private": true,
"packageManager": "[email protected]",
"description": "📄 Vite & Vue powered static blog generator.",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-valaxy/package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-valaxy/template-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/valaxy-theme-press/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valaxy-theme-press",
"version": "0.15.7",
"version": "0.15.8",
"description": "Docs Theme for Valaxy",
"author": {
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/valaxy-theme-yun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valaxy-theme-yun",
"version": "0.15.7",
"version": "0.15.8",
"author": {
"email": "[email protected]",
"name": "YunYouJun",
Expand Down
2 changes: 1 addition & 1 deletion packages/valaxy/package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
Expand Down

2 comments on commit c0b8f75

@vercel
Copy link

@vercel vercel bot commented on c0b8f75 Oct 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://yun.valaxy.site as production
🚀 Deployed on https://6533ff367c315e4343324710--valaxy.netlify.app

Please sign in to comment.