Skip to content

Development

mogrifier edited this page May 21, 2023 · 5 revisions

Because I forget things

Running your code changes. Sometime in 2021 or 2022 VSCode devs "helped out" by deprecating npm in favor of npm-scripts. I went through the various installs and uninstalls, including reinstalling node to fix all this. To run scripts now, click them in the sidebar when viewing the project explorer OR just type as before.

  1. npm run start - this still works!

Install a new nodejs module

  1. go to https://www.npmjs.com/
  2. find desired module
  3. run the install instructions (like 'npm install factorial')
  4. if you get vulnerability warnings, you can try to fix with 'npm audit fix'

How to publish a new version and make a release

  1. update the version number in package.json
  2. run "npm run publish"
  3. you will need a GITHUB_TOKEN set for this (this is an environment variable; set GITHUB_TOKEN = "value foes here")
  4. wait 5 minutes or so and verify command out looks good. Will look like:

PS C:\Users\eizde\software_projects\wavsyn> npm run publish

[email protected] publish C:\Users\eizde\software_projects\wavsyn electron-forge publish

✔ Checking your system ✔ Resolving Forge Config We need to package your application before we can make it ✔ Preparing to Package Application for arch: x64 ✔ Preparing native dependencies: 1 / 1 ✔ Packaging Application Making for the following targets: squirrel, zip ✔ Making for target: squirrel - On platform: win32 - For arch: x64 ✔ Making for target: zip - On platform: win32 - For arch: x64 ✔ Resolving publish target: @electron-forge/publisher-github ✔ Searching for target release: 1.0.10 ✔ Uploading Artifacts 4/2 to v1.0.10 PS C:\Users\eizde\software_projects\wavsyn>

Now go to the releases page and you should see the new one at the top of the list. Add any release notes you want and publish the release. Note that to get a build for Mac, you have to rebuild on the Mac and add the DMG file to the release.

Clone this wiki locally