Skip to content

Commit

Permalink
chore: generate license file in build directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kamo88 committed Aug 31, 2023
1 parent 6c9cfc4 commit 00913a3
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 1 deletion.
128 changes: 128 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kamo88/react-dialog-hooks",
"version": "0.9.3",
"version": "0.9.4",
"type": "module",
"description": "react use dialog hooks & dialog component",
"main": "./dist/umd/index.js",
Expand Down Expand Up @@ -78,6 +78,7 @@
"prettier-plugin-tailwindcss": "^0.5.3",
"react": "^17 || ^18",
"react-dom": "^17 || ^18",
"rollup-plugin-license": "^3.0.1",
"rollup-plugin-visualizer": "^5.9.2",
"storybook": "^7.3.2",
"tailwindcss": "^3.3.3",
Expand Down
10 changes: 10 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import tsconfigPaths from 'vite-tsconfig-paths';
import path from 'path';
import dts from 'vite-plugin-dts';
import { visualizer } from 'rollup-plugin-visualizer';
import license from 'rollup-plugin-license';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand Down Expand Up @@ -51,6 +52,15 @@ export default defineConfig(({ mode }) => {
],
outDir: path.resolve(__dirname, 'dist/types'),
}),
license({
thirdParty: {
includePrivate: true, // Default is false.
output: {
file: path.join(__dirname, 'dist', 'dependencies.txt'),
encoding: 'utf-8', // Default is utf-8.
},
},
}),
isAnalyze &&
visualizer({
open: true,
Expand Down

0 comments on commit 00913a3

Please sign in to comment.