Update README.md

replace extend with evalScope
This commit is contained in:
Felix Roos 2022-06-16 14:10:29 +02:00 committed by GitHub
parent c3f03f50b3
commit 729b4e18ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,10 @@ npm i @strudel.cycles/eval --save
import { evaluate, extend } from '@strudel.cycles/eval';
import * as strudel from '@strudel.cycles/core';
extend(strudel); // add strudel to eval scope
evalScope(
import('@strudel.cycles/core'),
// import other strudel packages here
); // add strudel to eval scope
async function run(code) {
const { pattern } = await evaluate(code);