Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Sep 30, 2024
1 parent 194bdbe commit bd5047d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 31 deletions.
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@
"pnpm": ">=6"
},
"author": "shiyiya",
"keywords": [
"oplayer",
"video-player"
],
"keywords": ["oplayer", "video-player"],
"scripts": {
"watch": "pnpm --parallel run start",
"start": "pnpm run watch",
"dev": "pnpm --filter=!@oplayer/docs --parallel run start",
"dev:exam": "cd examples/standalone && pnpm run start",
"dev:ui": "pnpm --filter=@oplayer/ui run start",
"build": "pnpm --filter=!@oplayer/docs run build",
"build:packs": "pnpm --filter=@oplayer/* run build",
"build": "pnpm --filter=!@oplayer/docs run build && cp -r packages/ui/dist/index.ui.js packages/core/dist",
"build:packs": "pnpm --filter=@oplayer/* run build && cp -r packages/ui/dist/index.ui.js packages/core/dist",
"build:core": "pnpm --filter=@oplayer/core run build",
"build:docs": "pnpm --filter=@oplayer/docs run build",
"build:plugins": "pnpm --filter=@oplayer/plugins run build",
Expand Down
4 changes: 4 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"main": "./dist/index.es.js",
"types": "./dist/src/index.d.ts",
"browser": "./dist/index.min.js",
"exports": {
"import": "./dist/index.es.js",
"require": "./dist/index.min.js"
},
"sideEffects": false,
"author": "shiyiya",
"homepage": "https://github.com/shiyiya/oplayer",
Expand Down
3 changes: 1 addition & 2 deletions packages/hls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"start": "concurrently -n es,dts \"vite build --watch\" \"tsc --emitDeclarationOnly --watch\"",
"tsc": "tsc --noEmit && echo",
"build:extra": "vite build --config vite.all.config.ts",
"build": "vite build && tsc --emitDeclarationOnly && pnpm run build:extra"
"build": "vite build && tsc --emitDeclarationOnly"
},
"files": [
"dist",
Expand Down
13 changes: 0 additions & 13 deletions packages/hls/vite.all.config.ts

This file was deleted.

4 changes: 4 additions & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"main": "./dist/index.es.js",
"types": "./dist/src/index.d.ts",
"browser": "./dist/index.min.js",
"exports": {
"import": "./dist/index.es.js",
"require": "./dist/index.min.js"
},
"sideEffects": false,
"author": "shiyiya",
"homepage": "https://github.com/shiyiya/oplayer",
Expand Down
12 changes: 2 additions & 10 deletions packages/ui/vite.core.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import { viteConfig } from '../../vite.config'
import { version as CoreVersion, name as CoreName, author, description, homepage } from '../core/package.json'
import { version as UIVersion, name as UIName } from '../ui/package.json'
import { plugin } from 'vite-plugin-merge-exports'
import { cpSync } from 'node:fs'

export default viteConfig(
'ui',
{
build: {
emptyOutDir: false,
rollupOptions: {
external: [],
output: { dir: '../core/dist' }
external: []
},
lib: {
entry: './src/index.core.ts',
Expand All @@ -24,15 +22,9 @@ export default viteConfig(
},
plugins: [
banner({
outDir: '../core/dist',
content: `/**\n * name: ${CoreName} + ${UIName}\n * version: v${CoreVersion} + v${UIVersion}\n * description: ${description}\n * author: ${author}\n * homepage: ${homepage}\n */`
}),
plugin(),
{
closeBundle() {
cpSync('../core/dist/index.ui.js', './dist/index.ui.js')
}
}
plugin()
]
},
false
Expand Down

0 comments on commit bd5047d

Please sign in to comment.