the big rename: @strudel.cycles/* -> @strudel/*

This commit is contained in:
Felix Roos 2024-01-18 09:54:37 +01:00
parent b10612da5c
commit 96bafa7f0b
90 changed files with 369 additions and 396 deletions

View file

@ -1,6 +1,4 @@
# @strudel.cycles/transpiler
**DEPRECATION NOTE**: This package is old and won't get any updates! The newer version goes by the name of [@strudel/transpiler](https://www.npmjs.com/package/@strudel/transpiler).
# @strudel/transpiler
This package contains a JS code transpiler with the following features:
@ -11,14 +9,14 @@ This package contains a JS code transpiler with the following features:
## Install
```sh
npm i @strudel.cycles/transpiler
npm i @strudel/transpiler
```
## Use
```js
import { transpiler } from '@strudel.cycles/core';
import { evaluate } from '@strudel.cycles/core';
import { transpiler } from '@strudel/core';
import { evaluate } from '@strudel/core';
transpiler('note("c3 [e3,g3]")', { wrapAsync: false, addReturn: false, simpleLocs: true });
/* mini('c3 [e3,g3]').withMiniLocation(7,17) */

View file

@ -1,4 +1,4 @@
import { evaluate as _evaluate } from '@strudel.cycles/core';
import { evaluate as _evaluate } from '@strudel/core';
import { transpiler } from './transpiler.mjs';
export * from './transpiler.mjs';

View file

@ -1,5 +1,5 @@
{
"name": "@strudel.cycles/transpiler",
"name": "@strudel/transpiler",
"version": "0.10.0",
"description": "Transpiler for strudel user code. Converts syntactically correct but semantically meaningless JS into evaluatable strudel code.",
"main": "index.mjs",
@ -30,8 +30,8 @@
},
"homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": {
"@strudel.cycles/core": "workspace:*",
"@strudel.cycles/mini": "workspace:*",
"@strudel/core": "workspace:*",
"@strudel/mini": "workspace:*",
"acorn": "^8.11.3",
"escodegen": "^2.1.0",
"estree-walker": "^3.0.1"

View file

@ -1,8 +1,8 @@
import escodegen from 'escodegen';
import { parse } from 'acorn';
import { walk } from 'estree-walker';
import { isNoteWithOctave } from '@strudel.cycles/core';
import { getLeafLocations } from '@strudel.cycles/mini';
import { isNoteWithOctave } from '@strudel/core';
import { getLeafLocations } from '@strudel/mini';
export function transpiler(input, options = {}) {
const { wrapAsync = false, addReturn = true, emitMiniLocations = true, emitWidgets = true } = options;