eval build

This commit is contained in:
Felix Roos 2023-01-28 22:32:48 +01:00
parent cde23bbf98
commit 4aa32415cd
3 changed files with 31 additions and 4 deletions

View File

@ -1,15 +1,20 @@
{
"name": "@strudel.cycles/eval",
"version": "0.5.0",
"version": "0.6.0",
"description": "Code evaluator for strudel",
"main": "index.mjs",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs"
},
"scripts": {
"build": "vite build",
"test": "vitest run"
},
"type": "module",
"directories": {
"test": "test"
},
"scripts": {
"test": "vitest run"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
@ -38,6 +43,7 @@
},
"devDependencies": {
"@strudel.cycles/mini": "workspace:*",
"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

@ -86,6 +86,7 @@ importers:
shift-parser: ^8.0.0
shift-spec: ^2019.0.0
shift-traverser: ^1.0.0
vite: ^3.2.2
vitest: ^0.25.7
dependencies:
'@strudel.cycles/core': 0.5.0
@ -97,6 +98,7 @@ importers:
shift-traverser: 1.0.0
devDependencies:
'@strudel.cycles/mini': link:../mini
vite: 3.2.5
vitest: 0.25.8
packages/midi: