Skip to content

Latest commit

 

History

History
executable file
·
92 lines (64 loc) · 2.43 KB

README.md

File metadata and controls

executable file
·
92 lines (64 loc) · 2.43 KB

Wilson Tunings Calculators

This is the web interface for the Erv library which allows for calculations and other algorithmic treatments of some of Erv Wilsons' music scale theories.

Embedding via script tag

<!-- The html element where the calcuator will be embeded -->
<div id="wilson-tunings-calculator"></div>

<!-- The example uses v 1.0.1 as seen in this part `wilson-tunings-web@1.0.1`
     Please check https://unpkg.com/browse/wilson-tunings-web/ for other versions  -->
<script
  type="text/javascript"
  src="https://unpkg.com/wilson-tunings-web@1.0.1/umd/wilson-tunings-web.js"
></script>
<script>
  // Currently `view` can be "mos", "cps" or null;
  wilson_tunings.main.init({
    elementId: "wilson-tunings-calculator",
    view: null,
  });
</script>

Basic styles can be found in the index.html file.

Development

Stack

Installation and compilation

Install all dependencies.

npm run install

Watch compile with with hot reloading, using the browser target as example.

npm run watch:browser

The above command will also start a server at port 5000 so that you can open http://localhost:5000 and load the website.

Production release

Build production builds for each target.

# Build all targets
npm run release
# or
npm run release:app
npm run release:library
npm run release:browser

Browser

# Build the JS bundle
npm run release:browser

# Serve the demo at http://localhost:5000
npm run start:browser

This will generate a file inside build/browser/browser-main.js, and use it from the generated build/browser/index.html which loads the script.

The browser-main.js file contains your JavaScript logic, so copy that into your server and load it into your main website HTML. See the provided src/_build_hooks/index.html as an example.

REPL

Start a REPL connected to current running program, app for the :build-id:

npx shadow-cljs cljs-repl app

License

MIT