strumming-metronome
Version:
A simple JavaScript metronome for strumming practice.
61 lines (41 loc) • 1.17 kB
Markdown
# Strumming Metronome
A simple JavaScript metronome for strumming practice.

## Features
* Adjustable tempo and time signature
* Sound for each selected strum
## Installation
```sh
npm install strumming-metronome
```
## Usage
### Test Package Locally
```sh
git clone git@gitlab.com:endtoendpaper/strumming-metronome.git
cd strumming-metronome
npx serve
```
Then, open your browser and go to: http://localhost:3000/src/strumming-metronome
### Add to Application
#### Import and Initialize the Metronome
```
<script type="module">
import createMetronome from "strumming-metronome"
</script>
```
#### Add div element with 'metronome-container' Id to HTML
```
<div id="metronome-container"></div>
```
### Integrate with Rails Assets
If you are using Rails, you can integrate the package by adding the following to your config/initializers/assets.rb:
```
Rails.application.config.assets.paths << Rails.root.join("node_modules/strumming-metronome/src/assets")
```
## Publishing Changes
To publish new changes to the npm package:
```sh
npm version patch # or minor or major
npm login
npm publish --access public
```