csound build

This commit is contained in:
Felix Roos 2023-01-28 22:27:18 +01:00
parent 555fe0b629
commit cde23bbf98
4 changed files with 34 additions and 5 deletions

View File

@ -1,10 +1,14 @@
{ {
"name": "@strudel.cycles/csound", "name": "@strudel.cycles/csound",
"version": "0.5.1", "version": "0.6.0",
"description": "csound bindings for strudel", "description": "csound bindings for strudel",
"main": "csound.mjs", "main": "index.mjs",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs"
},
"scripts": { "scripts": {
"test": "echo \"No tests present.\" && exit 0" "build": "vite build"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -27,8 +31,11 @@
}, },
"homepage": "https://github.com/tidalcycles/strudel#readme", "homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": { "dependencies": {
"@csound/browser": "^6.18.3",
"@strudel.cycles/core": "workspace:*", "@strudel.cycles/core": "workspace:*",
"@strudel.cycles/webaudio": "workspace:*", "@strudel.cycles/webaudio": "workspace:*"
"@csound/browser": "^6.18.3" },
"devDependencies": {
"vite": "^3.2.2"
} }
} }

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',
},
});

3
pnpm-lock.yaml generated
View File

@ -65,10 +65,13 @@ importers:
'@csound/browser': ^6.18.3 '@csound/browser': ^6.18.3
'@strudel.cycles/core': workspace:* '@strudel.cycles/core': workspace:*
'@strudel.cycles/webaudio': workspace:* '@strudel.cycles/webaudio': workspace:*
vite: ^3.2.2
dependencies: dependencies:
'@csound/browser': 6.18.5 '@csound/browser': 6.18.5
'@strudel.cycles/core': link:../core '@strudel.cycles/core': link:../core
'@strudel.cycles/webaudio': link:../webaudio '@strudel.cycles/webaudio': link:../webaudio
devDependencies:
vite: 3.2.5
packages/embed: packages/embed:
specifiers: {} specifiers: {}