Skip to content

Commit

Permalink
Update package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Nov 14, 2024
1 parent a713efb commit 24aec5e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@
"license": "MPL-2.0",
"author": "Fortanix",
"description": "Fortanix Baklava design system",
"repository": "https://github.com/fortanix/baklava",
"repository": {
"type": "git",
"url": "git+https://github.com/fortanix/baklava.git"
},
"sideEffects": [
"*.css"
],
"type": "module",
"files": [
"src",
"app",
"dist",
"LICENSE",
"CHANGELOG.md",
"README.md"
],
"scripts": {
"gen-package": "node package.json.js",
"install-project": "npm run gen-package && npm install --force",
Expand All @@ -18,7 +29,7 @@
"plop": "NODE_OPTIONS=\"--import tsx\" plop",
"import": "tsx scripts/import.ts",
"serve:dev": "vite --config=./vite.config.ts serve",
"build:prod": "vite --config=./vite.config.ts --emptyOutDir build && cp src/types/vite-env.d.ts dist && echo '{\"name\": \"@fortanix/baklava\",\"main\": \"./baklava.js\"}' > dist/package.json",
"build": "vite --config=./vite.config.ts --emptyOutDir build",
"storybook:serve": "storybook dev -p 6006",
"storybook:build": "storybook build --docs",
"check-types": "tsc --noEmit",
Expand All @@ -28,7 +39,8 @@
"test": "vitest run --root=.",
"test-ui": "vitest --ui",
"coverage": "vitest run --coverage",
"start": "npm run storybook:serve"
"start": "npm run storybook:serve",
"prepare": "npm run build"
},
"devDependencies": {
"plop": "^4.0.1",
Expand Down
17 changes: 15 additions & 2 deletions package.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ const packageConfig = {
license: 'MPL-2.0',
author: 'Fortanix',
description: 'Fortanix Baklava design system',
repository: 'https://github.com/fortanix/baklava',
repository: { type: 'git', url: 'git+https://github.com/fortanix/baklava.git' },

sideEffects: ['*.css'],

type: 'module',
files: [
'src',
'app',
'dist',
'LICENSE',
'CHANGELOG.md',
'README.md',
],

scripts: {
// Utilities
'gen-package': 'node package.json.js', // Update `package.json`
Expand All @@ -33,7 +42,8 @@ const packageConfig = {

// App
'serve:dev': 'vite --config=./vite.config.ts serve',
'build:prod': 'vite --config=./vite.config.ts --emptyOutDir build && cp src/types/vite-env.d.ts dist && echo \'{"name": "@fortanix/baklava","main": "./baklava.js"}\' > dist/package.json',
//'build': 'vite --config=./vite.config.ts --emptyOutDir build && cp src/types/vite-env.d.ts dist && echo \'{"name": "@fortanix/baklava","main": "./baklava.js"}\' > dist/package.json',
'build': 'vite --config=./vite.config.ts --emptyOutDir build',

// Storybook
'storybook:serve': 'storybook dev -p 6006',
Expand All @@ -53,6 +63,9 @@ const packageConfig = {

// Shorthands
'start': 'npm run storybook:serve',

// Hooks
'prepare': 'npm run build',
},

// Dev dependencies (only needed when building, or making changes to the code)
Expand Down

0 comments on commit 24aec5e

Please sign in to comment.