Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating main with changes from develop #58

Merged
merged 43 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f9d78c3
Merge pull request #44 from KCarlile/main
KCarlile Jun 12, 2024
bd7be07
Resolving merge conflicts
KCarlile Jun 12, 2024
1fd9a2c
CanvasID API usage - sample formatting
ckreiger1 Jun 1, 2024
97a5743
Update to the index file sample
ckreiger1 Jun 1, 2024
b135ad6
Updating docs formatting
KCarlile Jun 2, 2024
9ff300f
colorFretboard example attempted
ckreiger1 Jun 2, 2024
ca0c701
Fixing missing line in MD
KCarlile Jun 3, 2024
987385b
Tweaking formatting, adding TOC
KCarlile Jun 3, 2024
cedfa63
Moving API Docs to api-docs.md
KCarlile Jun 3, 2024
dd66d58
Updating README.md for split docs
KCarlile Jun 3, 2024
5157f92
Updating README.md
KCarlile Jun 3, 2024
c3a6fa8
Updating usage documentation
KCarlile Jun 4, 2024
d73d8a3
Updating usage documentation
KCarlile Jun 4, 2024
2d1074e
Removing code comments from docs
KCarlile Jun 4, 2024
00c9ff3
Adding temporary Windows symlink for Chad
KCarlile Jun 5, 2024
3adfa3d
Modifying bat file for Windows fix
KCarlile Jun 5, 2024
9a787bc
Fixing paths in bat file
KCarlile Jun 5, 2024
396fcae
Removing files before running win symlink fix
KCarlile Jun 5, 2024
aaa8d6f
Updated ColorNut and ColorNutOutline
ckreiger1 Jun 5, 2024
a663477
Small edits chaging Gets to Sets
ckreiger1 Jun 5, 2024
dc12a49
Removing chad-win-fix.bat script, abandoning this attempt
KCarlile Jun 5, 2024
f74e9e0
Adding JS examples
KCarlile Jun 5, 2024
83b2a2e
More get and set properties added to api-docs.md
ckreiger1 Jun 6, 2024
eb6423c
Finished adding the property entries for the config.js file
ckreiger1 Jun 8, 2024
457926f
Fixing markdown syntax issues
KCarlile Jun 11, 2024
caf9bcf
Merge pull request #46 from KCarlile/develop
KCarlile Jun 12, 2024
56f4284
Merge pull request #35 from KCarlile/10-productize-documentation
KCarlile Jun 12, 2024
d9016c4
Changed array copy to deep copy
KCarlile Jun 12, 2024
78680ba
Merge pull request #47 from KCarlile/42-string-names-flip-ordering-wh…
KCarlile Jun 12, 2024
af67ac8
Improving documentation for code owners
KCarlile Jun 12, 2024
ab0c209
Fixing broken link
KCarlile Jun 12, 2024
273ad8c
Updating README.md
KCarlile Jun 12, 2024
b82a32e
Merge pull request #48 from KCarlile/30-code-owner-documentation
KCarlile Jun 12, 2024
457ece8
Merge pull request #49 from KCarlile/develop
KCarlile Jun 12, 2024
816cc89
Renaming addCanvas() method to addCanvasToElement()
KCarlile Jun 12, 2024
c670ec5
Merge pull request #51 from KCarlile/50-rename-addcanvas-method
KCarlile Jun 12, 2024
d45adce
Merge pull request #52 from KCarlile/develop
KCarlile Jun 12, 2024
3d963a2
Updating README.md with example sites and instructions
KCarlile Jun 13, 2024
c5f2d8e
Merge pull request #54 from KCarlile/53-site-builder-examples
KCarlile Jun 13, 2024
8b95127
Merge branch '10-productize-documentation' into develop
KCarlile Jun 13, 2024
67bbe17
Updating issue templates and links.
KCarlile Jun 13, 2024
e9784ae
Fixing MD validation
KCarlile Jun 13, 2024
f0c7752
Merge pull request #56 from KCarlile/53-site-builder-examples
KCarlile Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/ISSUE_TEMPLATE/01-bug-report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug]"
name: Bug
about: Submit a bug describing a problematic behavior
title: "[Bug title]"
labels: bug
assignees: ''

Expand All @@ -11,6 +11,10 @@ assignees: ''

A description of the bug and how you found it, including steps to reproduce and notable parameters such as browser and OS. Also include how the system should have behaved. Provide screenshots if applicable.

## Steps to Reproduce

Describe the steps to reproduce the issue.

## Acceptance Criteria

- Bulleted list of what would constitute this bug being resolved
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/02-feature-request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature request
about: Feature Request or Enhancement
title: "[Feature or enhancement request]"
about: Submit a new feature idea or enhancement request
title: "[Feature or enhancement request title]"
labels: enhancement
assignees: ''

Expand Down
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/03-usage-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Usage submission
about: Submit a site using this project as an example of usage
title: "[Site name]"
labels: usage
assignees: ''

---

## Site

Provide the URL for your site.

## Usage Examples

Provide a list of any URLs for pages within your site that demonstrate usage of the project.

## Comments

Add any other comments or thoughts about your usage of the project.
2 changes: 1 addition & 1 deletion .github/workflows/demo-hosting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy examples directory to demo.kcarlile.com on main branch releases
name: Deploy docs/examples/* to demo hosting

on:
release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linting
name: Lint codebase

on: # yamllint disable-line rule:truthy
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Node.js Package
name: Build and publish to NPM

on:
release:
types: [created]
branches: [main]

jobs:
build:
Expand Down
118 changes: 33 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Guitar Diagrams JS

[![GitHub Release](https://img.shields.io/github/v/release/KCarlile/guitar-diagrams-js?include_prereleases&logo=github&label=Latest%20version)](https://github.com/KCarlile/guitar-diagrams-js/releases)
[![GitHub Actions Workflow Status](https://github.com/KCarlile/guitar-diagrams-js/actions/workflows/release-package.yml/badge.svg)](https://github.com/KCarlile/guitar-diagrams-js/actions/workflows/release-package.yml)
[![Super-Linter](https://github.com/KCarlile/guitar-diagrams-js/actions/workflows/linting.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)

Expand All @@ -16,8 +15,11 @@

_Guitar Diagrams JS_ is an open source JavaScript library for drawing guitar chords and scales on an HTML5 canvas.

Project: <https://github.com/KCarlile/guitar-diagrams-js>\
Version: 0.9.2
**Project:** <https://github.com/KCarlile/guitar-diagrams-js>\
**Version:** [![GitHub Release](https://img.shields.io/github/v/release/KCarlile/guitar-diagrams-js?include_prereleases&logo=github&label=Latest%20version)](https://github.com/KCarlile/guitar-diagrams-js/releases)\
**Demo:** <https://demo.kcarlile.com/guitar-diagrams-js/>

![Guitar Diagrams JS demo image](guitar-diagrams-js-demo.png)

### Why should you use Guitar Diagrams JS?

Expand All @@ -27,12 +29,14 @@ The benefit of Guitar Diagrams JS is that it provides a visual representation of

Here are some other comparisons to Guitar Diagrams JS:

| Name | Description | Visual | Graphical | Instrument Representation | No Sheet Music | Cost |
| ---- | ----------- | ------ | --------- | ------------------------- | -------------- | ---- |
| Guitar Diagrams JS | Create diagrams with minimal code and no graphics | ✅ | ✅ | ✅ | ✅ | $0 |
| Tablature (tabs) | Create diagrams manually with text | ✅ | ✅ | ⚠️ | ✅ | $0 |
| Graphic Design Software | Create diagrams manually with a graphic design program | ✅ | ✅ | ⚠️ | ✅ | [\$22.99/month](https://www.adobe.com/products/photoshop/plans.html) |
| Sheet Music | Create sheet music | ✅ | ❌ | ❌ | ❌ | [\$99](https://www.finalemusic.com/products/finale/special-pricing/) or [\$27.99/month](https://www.avid.com/sibelius/sibelius-ultimate-subscriptions?usertype=individual) |
| Name | Description | Visual | Graphical | Instrument Representation | No Sheet Music Reading | Works with Musical Passages | Cost |
| ---- | ----------- | ------ | --------- | ------------------------- | -------------- | ---------------- | ---- |
| Guitar Diagrams JS | Create diagrams with minimal code and no graphics | ✅ | ✅ | ✅ | ✅ | ❌ | $0 |
| Tablature (tabs) | Create diagrams manually with text | ✅ | ✅ | ⚠️ | ✅ | ✅ | $0, but time consuming and error prone |
| Graphic Design Software | Create diagrams manually with a graphic design program | ✅ | ✅ | ⚠️ | ✅ | ❌ | [\$22.99/month](https://www.adobe.com/products/photoshop/plans.html), and very time consuming |
| Sheet Music | Create sheet music | ✅ | ❌ | ❌ | ❌ | ✅ | [\$99](https://www.finalemusic.com/products/finale/special-pricing/) or [\$27.99/month](https://www.avid.com/sibelius/sibelius-ultimate-subscriptions?usertype=individual), and requires music notation proficiency |

Key: ✅Yes. ⚠️Maybe, sorta, kinda, optional. ❌ No.

## Project Lead/Owner and Contributors

Expand All @@ -46,14 +50,17 @@ GitHub profile: [@KCarlile](https://github.com/KCarlile)

If you contribute to the project in any way (code, documentation, testing, etc.), your name will appear in the list of contributors below:

- Kenny Carlile (project lead/owner)
- @KCarlile (project lead/owner)
- @ckreiger1
- _Your name here_

## Documentation and Examples

Please see the following pages for more information:

- [`README.md`](README.md): this page
- [`docs/index.md`](docs/index.md): general usage documentation
- [`docs/api-docs.md`](docs/api-docs.md): API usage documentation
- [`docs/index.md`](docs/index.md): main landing page for project documentation
- [`docs/api-docs.md`](docs/api-docs.md): API usage documentation
- [`docs/code-owner-docs.md`](docs/code-owner-docs.md): technical documentation for code owners
Expand All @@ -62,96 +69,37 @@ Please see the following pages for more information:
- [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md): instructions for contributing to the project
- [`LICENSE`](LICENSE): license file for the project

## Change Log

See the repository's [Releases page](https://github.com/KCarlile/guitar-diagrams-js/releases) for each release and associated release notes.

## Technical Information for Site Builders

### Usage in Your Project

#### Option 1: Installation as a Node Dependency

For full details, see the Node JS packages released by this project here: <https://github.com/KCarlile/guitar-diagrams-js/pkgs/npm/guitar-diagrams-js>

You can install Guitar Diagrams JS in your project as a Node JS dependency via NPM. Run the following command from your project's directory:

```bash
npm install @kcarlile/[email protected]
```
### Site Builder Examples

Or, alternately, you can manually edit your `package.json` file and add the following entry:
If you're a site builder using Guitar Diagrams JS, your site should be featured here as an example of how to use this library.
Please [submit an issue of Usage Submission type](https://github.com/KCarlile/guitar-diagrams-js/issues/new?labels=usage&template=03-usage-submission.md&title=%5BSite%20name%5D) with a link to your site, plus any links to specific pages using Guitar Diagrams JS, and it will be added to the list below.

```json
"@kcarlile/guitar-diagrams-js": "0.9.2",
```
**Example sites:**

#### Option 2: Manual Installation via CDN
- [Guitar Diagrams JS demo/examples](https://demo.kcarlile.com/guitar-diagrams-js/)
- _Your site here!_

If you want to use a CDN-hosted package (e.g., Guitar Diagrams JS on JSDelivr at `https://cdn.jsdelivr.net/gh/KCarlile/guitar-diagrams-js@main/guitar-diagrams.js`), you can reference it in your code like this:
### Site Builders - Technical Information

```html
<div id="diagram-1"></div>
<script type="module">
import { GuitarDiagramsJS } from 'https://cdn.jsdelivr.net/gh/KCarlile/guitar-diagrams-js@main/guitar-diagrams.js';
You can find the full usage documentation at [`docs/index.md`](docs/index.md) and the API documentation at [`docs/api-docs.md`](docs/api-docs.md). The following information is just a high-level overview of how to use Guitar Diagrams JS.

let gdj1 = new GuitarDiagramsJS();
gdj1.config.canvasID = 'diagram-1-canvas'; // specify the canvas element's an ID
gdj1.addCanvas('diagram-1'); // add the canvas to the specified element ID on the page
gdj1.drawNeck(); // draw the fretboard
</script>
```
#### Change Log

Be sure to add some target HTML element to your page with a matching ID (`gdj1.addCanvas('diagram-1');` where `diagram-1` is the ID) in your JS code so Guitar Diagrams JS knows where to add your drawing:

```html
<div id="diagram-1"></div>
```

#### Option 3: Manual Installation via Local Copies

You can also install this package manually by downloading it, placing the files in the correct location, and modifying your site's code to reference the library. The following steps outline this process:

1. Download the repository files from the [GitHub repository for Guitar Diagrams JS](https://github.com/KCarlile/guitar-diagrams-js).
1. The only files about which you should be concerned are the following:
- `guitar-diagrams.js`: main functionality
- `guitar-diagrams-config.js`: config object
- `guitar-diagrams-marker.js`: marker object
1. Place those files in your application at `wherever/you/put/your/js/files/guitar-diagram-js/`.
1. In the JS file with your primary entrypoint, add an import statement:

```javascript
import { GuitarDiagramsJS } from 'wherever/you/put/your/js/files/guitar-diagrams-js/guitar-diagrams.js';
```

1. Following that import statement, begin to reference the library:

```javascript
let gdj1 = new GuitarDiagramsJS();
gdj1.config.canvasID = 'diagram-1-canvas'; // specify the canvas element's an ID
gdj1.addCanvas('diagram-1'); // add the canvas to the specified element ID on the page
gdj1.drawNeck(); // draw the fretboard
```

1. Be sure to add some target HTML element to your page with a matching ID (`gdj1.addCanvas('diagram-1');` where `diagram-1` is the ID) in your JS code so Guitar Diagrams JS knows where to add your drawing:

```html
<div id="diagram-1"></div>
```
See the repository's [Releases page](https://github.com/KCarlile/guitar-diagrams-js/releases) for each release and associated release notes.

### More Information
#### More Information

For more information, please see the [`docs/index.md`](docs/index.md) and ['docs/examples/index.html`](docs/examples/index.html) pages for API documentation and examples.
For more information, please see the [`docs/index.md`](docs/index.md) and [`docs/api-docs.md`](docs/api-docs.md) pages for general usage help and API documentation. See also the [`docs/examples/index.html`](docs/examples/index.html) page for usage examples.

## Technical Information for Code Owners
### Code Owners - Technical Information

See [`docs/code-owners.md`](docs/code-owners.md) for documentation related to development and deployment.
See [`docs/code-owner-docs.md`](docs/code-owner-docs.md) for documentation related to development and deployment.

## Dependency Requirements
### Dependency Requirements

There are no specific requirements<sup>[1](#footnotes)</sup> for dependencies to use Guitar Diagrams JS other than the standard browser compatibility considerations with CSS, JavaScript, and HTML 5's `<canvas>` tag. Browser compatibility for the `<canvas>` tag can be found on [the MDN `<canvas>` page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#browser_compatibility).

----
---

## References

Expand Down
Loading