add mini build
This commit is contained in:
parent
657091307e
commit
be44c28fd3
3 changed files with 28 additions and 1 deletions
|
|
@ -4,9 +4,14 @@
|
||||||
"description": "Mini notation for strudel",
|
"description": "Mini notation for strudel",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"publishConfig": {
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"module": "dist/index.mjs"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"build:parser": "peggy -o krill-parser.js --format es ./krill.pegjs"
|
"build:parser": "peggy -o krill-parser.js --format es ./krill.pegjs",
|
||||||
|
"build": "vite build"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -30,6 +35,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"peggy": "^2.0.1",
|
"peggy": "^2.0.1",
|
||||||
|
"vite": "^3.2.2",
|
||||||
"vitest": "^0.25.7"
|
"vitest": "^0.25.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
packages/mini/vite.config.js
Normal file
19
packages/mini/vite.config.js
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import { dependencies } from './package.json';
|
||||||
|
import { resolve } from 'path';
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [],
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'index.mjs'),
|
||||||
|
formats: ['es', 'cjs'],
|
||||||
|
fileName: (ext) => ({ es: 'index.mjs', cjs: 'index.js' }[ext]),
|
||||||
|
},
|
||||||
|
rollupOptions: {
|
||||||
|
external: [...Object.keys(dependencies)],
|
||||||
|
},
|
||||||
|
target: 'esnext',
|
||||||
|
},
|
||||||
|
});
|
||||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
|
|
@ -110,11 +110,13 @@ importers:
|
||||||
specifiers:
|
specifiers:
|
||||||
'@strudel.cycles/core': workspace:*
|
'@strudel.cycles/core': workspace:*
|
||||||
peggy: ^2.0.1
|
peggy: ^2.0.1
|
||||||
|
vite: ^3.2.2
|
||||||
vitest: ^0.25.7
|
vitest: ^0.25.7
|
||||||
dependencies:
|
dependencies:
|
||||||
'@strudel.cycles/core': link:../core
|
'@strudel.cycles/core': link:../core
|
||||||
devDependencies:
|
devDependencies:
|
||||||
peggy: 2.0.1
|
peggy: 2.0.1
|
||||||
|
vite: 3.2.5
|
||||||
vitest: 0.25.8
|
vitest: 0.25.8
|
||||||
|
|
||||||
packages/osc:
|
packages/osc:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue