`guitar-diagrams-marker.mjs` Public Methods
-Methods in `guitar-diagrams-marker.js` go here...
+Methods in `guitar-diagrams-marker.mjs` go here...
diff --git a/docs/code-owner-docs.md b/docs/code-owner-docs.md
index 8fc73d2..0bf50ef 100644
--- a/docs/code-owner-docs.md
+++ b/docs/code-owner-docs.md
@@ -37,7 +37,6 @@ This section outlines the directory structure of the project.
- `workflows/`: YML files to define GitHub Actions.
- `demo-hosting.yml`: GitHub Actions workflow to deploy `examples/` content to GoDaddy hosting for demos.
- `linting.yml`: GitHub Actions workflow for linting codebase.
- - `release-package.yml`: GitHub Actions workflow to create an NPM package for release and hosting on GitHub.
- `.scripts/`: Local scripts used for development, packaging, and releases.
- `build.sh`: Build script to prepare package for deployment by running linting and deployment tasks. Run with `npm run build`.
- `linting.sh`: Script to run Super-Linter for HTML, JS, CSS, and Markdown linting. Runs as part of the `build.sh` script.
@@ -63,11 +62,7 @@ This section outlines the directory structure of the project.
- `guitar-diagrams-config.mjs`: Config object for defining the library's behavior.
- `guitar-diagrams-marker.mjs`: Object for a marker instance.
- `.gitignore`: File patterns to ignore for Git.
-- `.npmignore`: File patterns to ignore for NPM.
-- `.npmrc`: Config values for NPM deployments.
- `LICENSE`: Software license file (GPL-3.0)
-- `package.json`: NPM package config.
-- `package-lock.json`: NPM dependency tree, automatically generated by NPM from `package.json`.
- `README.md`: Main/intro documentation for the project.
## Code Architecture
@@ -109,13 +104,11 @@ There are three workflows defined for GitHub Actions and those exist at the foll
- `workflows/`
- `demo-hosting.yml`
- `linting.yml`
- - `release-package.yml`
| File Name | Workflow Name | Trigger(s) | Branch(es) | Description |
| --------- | ------------- | ---------- | ---------- | ----------- |
| Deploy docs/examples/* to demo hosting | `demo-hosting.yml` | Release published | `main` | Copies `docs/examples/*` to @KCarlile's personal GoDaddy hosting via FTP for public demo of functionality at . |
| Lint codebase | `linting.yml` | Push, PR | `main`, `develop` | Runs Super-Linter against HTML, CSS, JS, and Markdown files in the codebase when code is pushed to `main` or `develop` and when a PR is created against `main` or `develop`. |
-| Build and publish to NPM | `release-package.yml` | Release created | `main` | Builds and publishes the project to NPM when release are created on `main`. |
## Demo Hosting
@@ -130,7 +123,7 @@ The `.scripts/build.sh` script, which is run by calling `npm run build` from the
### Local Builds and Releases
- When all of your code changes are complete, AND...
-- You've executed `.scripts/build.sh`, AND...
+- You've executed `.scripts/build.sh` via `npm run build`, AND...
- You're not seeing any errors in the output of the build script, THEN...
- Commit your changes and push to GitHub, then issue a PR into the `develop` branch for testing.
@@ -140,9 +133,7 @@ When enough changes (bugs and new features) have been merged into the `develop`
1. Create a PR from the `develop` branch into `main` branch.
1. Once that PR is merged into `main`, checkout `main` locally and pull to get the latest changes. Then, update the version number in `package.json` in your local `main` branch and commit, then push back up to GitHub. (Release creation will fail if the version in `package.json` is not the same as the version you are creating.)
-1. Use the [Release page](https://github.com/KCarlile/guitar-diagrams-js/releases) to create a new release which will kick off a new package deployment using the GitHub Action workflow defined in `.github/workflows/release-package.yml`.
-
-Once the workflow has completed successfully, the package will be hosted on the [Packages page](https://github.com/KCarlile/guitar-diagrams-js/pkgs/npm/guitar-diagrams-js).
+1. Use the [Release page](https://github.com/KCarlile/guitar-diagrams-js/releases) to create a new release.
### Versioning
diff --git a/docs/examples/index.html b/docs/examples/index.html
index ef4b97a..52b7660 100644
--- a/docs/examples/index.html
+++ b/docs/examples/index.html
@@ -19,7 +19,7 @@ Preface - Setup
Before adding the code to draw your diagram, you'll need to include the Guitar Diagrams JS library and
provide a target element (e.g., a <div>
) to which the app can add the canvas and begin drawing.
To include the library, use an import statement at the top of your script1 with the following:
- import { GuitarDiagramsJS } from 'path/to/guitar-diagrams.js';
+ import { GuitarDiagramsJS } from 'path/to/guitar-diagrams.mjs';
1The script can be an inline script with <script>
tags, or it could be in its own JavaScript file that you include or reference in some other way.
To give Guitar Diagrams JS a place to add the drawing, you'll need to specify a block-level element
@@ -110,12 +110,12 @@
Code
gdj3.addMarker(3, 1);
gdj3.drawAllMarkers();
The markers that would be rendered off the fretboard are logged in the browser's console log as the errors seen below:
- guitar-diagrams.js:677 [State] GuitarDiagramsJS.addMarker(): { minFret: 0 | maxFret: 3 }
-guitar-diagrams.js:679 [Error] GuitarDiagramsJS.addMarker(): Fret marker could not be placed on fretboard. { paramString: 4 | paramFret: 4 | paramText: 4 | paramShape: null }
-guitar-diagrams.js:677 [State] GuitarDiagramsJS.addMarker(): { minFret: 0 | maxFret: 3 }
-guitar-diagrams.js:679 [Error] GuitarDiagramsJS.addMarker(): Fret marker could not be placed on fretboard. { paramString: 5 | paramFret: 5 | paramText: 5 | paramShape: null }
-guitar-diagrams.js:677 [State] GuitarDiagramsJS.addMarker(): { minFret: 0 | maxFret: 3 }
-guitar-diagrams.js:679 [Error] GuitarDiagramsJS.addMarker(): Fret marker could not be placed on fretboard. { paramString: 6 | paramFret: 4 | paramText: 6 | paramShape: null }
+ guitar-diagrams.mjs:677 [State] GuitarDiagramsJS.addMarker(): { minFret: 0 | maxFret: 3 }
+guitar-diagrams.mjs:679 [Error] GuitarDiagramsJS.addMarker(): Fret marker could not be placed on fretboard. { paramString: 4 | paramFret: 4 | paramText: 4 | paramShape: null }
+guitar-diagrams.mjs:677 [State] GuitarDiagramsJS.addMarker(): { minFret: 0 | maxFret: 3 }
+guitar-diagrams.mjs:679 [Error] GuitarDiagramsJS.addMarker(): Fret marker could not be placed on fretboard. { paramString: 5 | paramFret: 5 | paramText: 5 | paramShape: null }
+guitar-diagrams.mjs:677 [State] GuitarDiagramsJS.addMarker(): { minFret: 0 | maxFret: 3 }
+guitar-diagrams.mjs:679 [Error] GuitarDiagramsJS.addMarker(): Fret marker could not be placed on fretboard. { paramString: 6 | paramFret: 4 | paramText: 6 | paramShape: null }
diff --git a/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.mjs b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.mjs
index 3b04fd0..631d4ee 100644
--- a/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.mjs
+++ b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.mjs
@@ -1,6 +1,6 @@
/**
* @file Guitar Diagrams JS config class.
- * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-config.js
+ * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-config.mjs
* @link https://github.com/KCarlile/guitar-diagrams-js
*
* @author Kenny Carlile
diff --git a/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.mjs b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.mjs
index aab441d..d81e092 100644
--- a/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.mjs
+++ b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.mjs
@@ -1,6 +1,6 @@
/**
* @file Guitar Diagrams JS marker class.
- * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-marker.js
+ * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-marker.mjs
* @link https://github.com/KCarlile/guitar-diagrams-js
*
* @author Kenny Carlile
diff --git a/docs/examples/js/guitar-diagrams-js/guitar-diagrams.mjs b/docs/examples/js/guitar-diagrams-js/guitar-diagrams.mjs
index e114173..094d7c3 100644
--- a/docs/examples/js/guitar-diagrams-js/guitar-diagrams.mjs
+++ b/docs/examples/js/guitar-diagrams-js/guitar-diagrams.mjs
@@ -1,6 +1,6 @@
/**
* @file Guitar Diagrams JS main class.
- * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams.js
+ * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams.mjs
* @link https://github.com/KCarlile/guitar-diagrams-js
*
* @author Kenny Carlile
diff --git a/docs/index.md b/docs/index.md
index ffae2c4..0ad5196 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -6,33 +6,18 @@
There are three primary ways to include the Guitar Diagrams JS library into your project:
-1. Install the Guitar Diagrams JS library as a Node JS dependency
1. Reference the Guitar Diagrams JS library from a hosted CDN provider
1. Reference the Guitar Diagrams JS library from a local copy of the JavaScript (JS) files
-#### Option 1: Installation as a Node JS Dependency
+:information_source: Note: in some future state, Guitar Diagrams JS may be available as a NPM package. (See issue [#65](https://github.com/KCarlile/guitar-diagrams-js/issues/65).)
-For full details, see the Node JS packages released by this project here:
+#### Option 1: Manual Reference via CDN-Hosted Files
-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 where `x.y.z` (e.g., `1.0.2`) is the version (or branch name, such as `main`) of the library you want to use:
-
-```bash
-npm install @kcarlile/guitar-diagrams-js@x.y.z
-```
-
-Or, alternately, you can manually edit your `package.json` file and add the following entry:
-
-```json
-"@kcarlile/guitar-diagrams-js": "x.y.z",
-```
-
-#### Option 2: Manual Reference via CDN-Hosted Files
-
-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:
+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/src/guitar-diagrams.mjs`), you can reference it in your code like this:
```html
```
@@ -43,21 +28,21 @@ Be sure to add some target HTML element to your page with a matching ID (`gdj1.a
```
-#### Option 3: Manual Reference via Local Copies of Files
+#### Option 2: Manual Reference via Local Copies of Files
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
+ - `guitar-diagrams.mjs`: main functionality
+ - `guitar-diagrams-config.mjs`: config object
+ - `guitar-diagrams-marker.mjs`: 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
```
diff --git a/package-lock.json b/package-lock.json
index 3ef74fb..39a8690 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@KCarlile/guitar-diagrams-js",
- "version": "0.9.2",
+ "version": "0.9.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@KCarlile/guitar-diagrams-js",
- "version": "0.9.2",
+ "version": "0.9.4",
"license": "GPL-3.0"
}
}
diff --git a/package.json b/package.json
index 896b6ee..512ba0e 100644
--- a/package.json
+++ b/package.json
@@ -48,8 +48,5 @@
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/KCarlile/guitar-diagrams-js/issues"
- },
- "publishConfig": {
- "@KCarlile:registry": "https://npm.pkg.github.com"
}
}
diff --git a/src/guitar-diagrams-config.mjs b/src/guitar-diagrams-config.mjs
index 3b04fd0..631d4ee 100644
--- a/src/guitar-diagrams-config.mjs
+++ b/src/guitar-diagrams-config.mjs
@@ -1,6 +1,6 @@
/**
* @file Guitar Diagrams JS config class.
- * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-config.js
+ * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-config.mjs
* @link https://github.com/KCarlile/guitar-diagrams-js
*
* @author Kenny Carlile
diff --git a/src/guitar-diagrams-marker.mjs b/src/guitar-diagrams-marker.mjs
index aab441d..d81e092 100644
--- a/src/guitar-diagrams-marker.mjs
+++ b/src/guitar-diagrams-marker.mjs
@@ -1,6 +1,6 @@
/**
* @file Guitar Diagrams JS marker class.
- * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-marker.js
+ * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams-marker.mjs
* @link https://github.com/KCarlile/guitar-diagrams-js
*
* @author Kenny Carlile
diff --git a/src/guitar-diagrams.mjs b/src/guitar-diagrams.mjs
index e114173..094d7c3 100644
--- a/src/guitar-diagrams.mjs
+++ b/src/guitar-diagrams.mjs
@@ -1,6 +1,6 @@
/**
* @file Guitar Diagrams JS main class.
- * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams.js
+ * @module js/lib/Guitar-Diagrams-JS/guitar-diagrams.mjs
* @link https://github.com/KCarlile/guitar-diagrams-js
*
* @author Kenny Carlile