tonal build

This commit is contained in:
Felix Roos 2023-01-28 23:06:59 +01:00
parent fddbb2e2ac
commit 6118bd24f2
3 changed files with 28 additions and 1 deletions

View File

@ -3,10 +3,15 @@
"version": "0.5.0",
"description": "Tonal functions for strudel",
"main": "index.mjs",
"type": "module",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs"
},
"scripts": {
"build": "vite build",
"test": "vitest run"
},
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
@ -31,6 +36,7 @@
"webmidi": "^3.0.21"
},
"devDependencies": {
"vite": "^3.2.2",
"vitest": "^0.25.7"
}
}

View 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
View File

@ -214,6 +214,7 @@ importers:
'@strudel.cycles/core': workspace:*
'@tonaljs/tonal': ^4.7.2
chord-voicings: ^0.0.1
vite: ^3.2.2
vitest: ^0.25.7
webmidi: ^3.0.21
dependencies:
@ -222,6 +223,7 @@ importers:
chord-voicings: 0.0.1
webmidi: 3.1.2
devDependencies:
vite: 3.2.5
vitest: 0.25.8
packages/tone: