chore: separate build:lib script
This commit is contained in:
parent
a054310da0
commit
7e8cdee7df
3 changed files with 34 additions and 6 deletions
|
|
@ -1,15 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "@ayo-run/status-indicator",
|
"name": "@ayo-run/status-indicator",
|
||||||
"version": "0.0.1",
|
"version": "0.0.3-alpha",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Project scaffolding for a new web component",
|
"description": "Project scaffolding for a new web component",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"author": "Ayo Ayco",
|
"author": "Ayo Ayco",
|
||||||
"module": "./dist/status-indicator.js",
|
"module": "./dist/status-indicator.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": "./dist/status-indicator.js"
|
||||||
"import": "./dist/status-indicator.js"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|
@ -20,10 +18,12 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Warning: no test specified\"",
|
"test": "echo \"Warning: no test specified\"",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
"build:lib": "vite build --config vite-lib.config.ts",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.6.1",
|
||||||
"eslint": "^10.3.0",
|
"eslint": "^10.3.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"vite": "^8.0.11"
|
"vite": "^8.0.11"
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ importers:
|
||||||
specifier: ^4.1.1
|
specifier: ^4.1.1
|
||||||
version: 4.1.1
|
version: 4.1.1
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^25.6.1
|
||||||
|
version: 25.6.1
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^10.3.0
|
specifier: ^10.3.0
|
||||||
version: 10.3.0
|
version: 10.3.0
|
||||||
|
|
@ -20,7 +23,7 @@ importers:
|
||||||
version: 9.1.7
|
version: 9.1.7
|
||||||
vite:
|
vite:
|
||||||
specifier: ^8.0.11
|
specifier: ^8.0.11
|
||||||
version: 8.0.11
|
version: 8.0.11(@types/node@25.6.1)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
|
|
@ -202,6 +205,9 @@ packages:
|
||||||
'@types/json-schema@7.0.15':
|
'@types/json-schema@7.0.15':
|
||||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||||
|
|
||||||
|
'@types/node@25.6.1':
|
||||||
|
resolution: {integrity: sha512-coJCN8O1q4AGyyqCAUSP06P+SrMTu18BkEj3NVAK07q6QUneD2wzj3CLv9+yP+BMeZQlMvneXqqvDe3w+xcq7g==}
|
||||||
|
|
||||||
acorn-jsx@5.3.2:
|
acorn-jsx@5.3.2:
|
||||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|
@ -531,6 +537,9 @@ packages:
|
||||||
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
|
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|
||||||
|
undici-types@7.19.2:
|
||||||
|
resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==}
|
||||||
|
|
||||||
uri-js@4.4.1:
|
uri-js@4.4.1:
|
||||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||||
|
|
||||||
|
|
@ -728,6 +737,10 @@ snapshots:
|
||||||
|
|
||||||
'@types/json-schema@7.0.15': {}
|
'@types/json-schema@7.0.15': {}
|
||||||
|
|
||||||
|
'@types/node@25.6.1':
|
||||||
|
dependencies:
|
||||||
|
undici-types: 7.19.2
|
||||||
|
|
||||||
acorn-jsx@5.3.2(acorn@8.16.0):
|
acorn-jsx@5.3.2(acorn@8.16.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn: 8.16.0
|
acorn: 8.16.0
|
||||||
|
|
@ -1028,11 +1041,13 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
prelude-ls: 1.2.1
|
prelude-ls: 1.2.1
|
||||||
|
|
||||||
|
undici-types@7.19.2: {}
|
||||||
|
|
||||||
uri-js@4.4.1:
|
uri-js@4.4.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode: 2.3.1
|
punycode: 2.3.1
|
||||||
|
|
||||||
vite@8.0.11:
|
vite@8.0.11(@types/node@25.6.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
lightningcss: 1.32.0
|
lightningcss: 1.32.0
|
||||||
picomatch: 4.0.4
|
picomatch: 4.0.4
|
||||||
|
|
@ -1040,6 +1055,7 @@ snapshots:
|
||||||
rolldown: 1.0.0-rc.18
|
rolldown: 1.0.0-rc.18
|
||||||
tinyglobby: 0.2.16
|
tinyglobby: 0.2.16
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/node': 25.6.1
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
||||||
web-component-base@4.1.1: {}
|
web-component-base@4.1.1: {}
|
||||||
|
|
|
||||||
12
vite-lib.config.ts
Normal file
12
vite-lib.config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { resolve } from 'node:path'
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(import.meta.dirname, 'src/status-indicator.js'),
|
||||||
|
name: 'StatusIndicator',
|
||||||
|
fileName: 'status-indicator'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
Loading…
Reference in a new issue