Skip to content

Commit

Permalink
feat:add banner
Browse files Browse the repository at this point in the history
  • Loading branch information
l-x-f committed Feb 8, 2022
1 parent 454e806 commit 31efc45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pinia-persistedstate-plugin",
"version": "0.0.7",
"version": "0.0.8",
"description": "A pinia plugin like vuex-persistedstate.",
"types": "dist/index.d.ts",
"license": "MIT",
Expand Down Expand Up @@ -32,9 +32,10 @@
"@types/node": "^16.11.7",
"typescript": "^4.3.2",
"vite": "^2.6.4",
"vite-plugin-banner": "^0.2.0",
"vite-plugin-dts": "^0.9.4"
},
"dependencies": {
"pinia": "^2.0.3"
}
}
}
7 changes: 6 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import path from 'path'
import { defineConfig, UserConfigExport, ConfigEnv } from 'vite'
import dts from 'vite-plugin-dts'
import banner from 'vite-plugin-banner'
import pkg from './package.json'

// https://vitejs.dev/config/
const config = ({ command, mode }: ConfigEnv): UserConfigExport => {
Expand All @@ -26,7 +28,10 @@ const config = ({ command, mode }: ConfigEnv): UserConfigExport => {
dts({
insertTypesEntry: true,
copyDtsFiles: false
})
}),
banner(
`/**\n * name: ${pkg.name}\n * version: v${pkg.version}\n * description: ${pkg.description}\n * author: ${pkg.author}\n * homepage: ${pkg.homepage}\n */`
)
]
})
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ universalify@^2.0.0:
resolved "https://registry.npmmirror.com/universalify/download/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha1-daSYTv7cSwiXXFrrc/Uw0C3yVxc=

vite-plugin-banner@^0.2.0:
version "0.2.0"
resolved "https://registry.npmmirror.com/vite-plugin-banner/-/vite-plugin-banner-0.2.0.tgz#a67a938c9c5b338490d567628a3ba514dd847c90"
integrity sha512-IBRYVK6v92ihchBYxl6yhT57hr2cRnSX4RX6CJp84vNeWAg/Hht4B5Ywe0jwKA26Kkx/Yx4SGbMp8YLvAqm2pg==

vite-plugin-dts@^0.9.4:
version "0.9.4"
resolved "https://registry.npmmirror.com/vite-plugin-dts/download/vite-plugin-dts-0.9.4.tgz#f949ecd21d6469ee7dfc41d115397f8131a235f0"
Expand Down

0 comments on commit 31efc45

Please sign in to comment.