Skip to content

Commit 694df3e

Browse files
committed
add developer guide, run package updates, and format
1 parent 936b58e commit 694df3e

File tree

5 files changed

+85
-18
lines changed

5 files changed

+85
-18
lines changed

DEVELOPER_GUIDE.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# WebChucK IDE Developer Guide
2+
3+
How to contribute to WebChucK IDE development!
4+
5+
**NOTE**: All development is done on the `dev` branch. `main` is reserved for
6+
release.
7+
8+
## Table of Contents
9+
- [WebChucK IDE Developer Guide](#webchuck-ide-developer-guide)
10+
- [Table of Contents](#table-of-contents)
11+
- [Setup](#setup)
12+
- [Development Testing](#development-testing)
13+
- [Building](#building)
14+
- [Deploy and Release](#deploy-and-release)
15+
16+
## Setup
17+
18+
Make sure you have [Git](https://git-scm.com) and [Node](https://nodejs.org) installed.
19+
20+
Clone the repository if you haven't already.
21+
22+
```
23+
git clone https://github.com/ccrma/webchuck-ide.git
24+
```
25+
26+
In the webchuck-ide repo, install npm dependencies
27+
28+
```
29+
npm install
30+
```
31+
32+
## Development Testing
33+
34+
To run WebChucK IDE locally for development testing
35+
36+
```
37+
npm run dev
38+
```
39+
40+
## Building
41+
42+
Build WebChucK IDE to a static site by running:
43+
44+
```
45+
npm run build
46+
```
47+
48+
This will build WebChucK IDE and place all necessary files in the `./dist` folder.
49+
50+
## Deploy and Release
51+
52+
To package and release a new version of WebChucK IDE, make sure all changes are
53+
PR'ed onto the `main` branch. From `main`, make a clean build of WebChucK IDE,
54+
then tag the version for release.
55+
56+
```
57+
npm run clean
58+
npm install
59+
npm run build
60+
npm version patch
61+
```
62+
63+
Copy the `./dist/` folder to hosting destination.
64+
65+
Talk to **@gewang** to update the [WebChucK IDE](https://chuck.stanford.edu/ide) site..

package-lock.json

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.1.4",
55
"type": "module",
66
"scripts": {
7-
"clean": "rm -rf dist",
7+
"clean": "rm -rf dist && rm -rf node_modules",
88
"dev": "vite",
99
"build": "tsc && vite build",
1010
"preview": "vite preview",

src/components/examples/examples.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ export default class Examples {
110110
Examples.newExample(
111111
"Hello Sine GUI",
112112
() => {
113-
loadChuckFileFromURL("examples/helloSineGUI.ck")
113+
loadChuckFileFromURL("examples/helloSineGUI.ck");
114114
InputPanelHeader.setNotificationPing(0, true);
115115
},
116116
guiNested
117117
);
118118
Examples.newExample(
119119
"FM Synthesis GUI",
120120
() => {
121-
loadChuckFileFromURL("examples/fmGUI.ck")
121+
loadChuckFileFromURL("examples/fmGUI.ck");
122122
InputPanelHeader.setNotificationPing(0, true);
123123
},
124124
guiNested
@@ -134,14 +134,14 @@ export default class Examples {
134134
"Mouse PWM HID",
135135
() => {
136136
loadChuckFileFromURL("examples/mouseHID.ck"),
137-
InputPanelHeader.setNotificationPing(1, true);
137+
InputPanelHeader.setNotificationPing(1, true);
138138
},
139139
hidNested
140140
);
141141
Examples.newExample(
142142
"Keyboard Organ HID",
143143
() => {
144-
loadChuckFileFromURL("examples/keyboardHID.ck")
144+
loadChuckFileFromURL("examples/keyboardHID.ck");
145145
InputPanelHeader.setNotificationPing(1, true);
146146
},
147147
hidNested

src/components/inputPanel/inputPanelHeader.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default class InputPanelHeader {
4141
InputPanelHeader.inputContainers.push(
4242
document.querySelector<HTMLDivElement>("#SensorContainer")!
4343
);
44-
InputPanelHeader.inputPings.push(
44+
InputPanelHeader.inputPings.push(
4545
document.querySelector<HTMLSpanElement>("#SensorPing")!
4646
);
4747

@@ -91,7 +91,9 @@ export default class InputPanelHeader {
9191
*/
9292
static setNotificationPing(tabIndex: number, on: boolean) {
9393
for (let i = 0; i < InputPanelHeader.inputButtons.length; i++) {
94-
InputPanelHeader.inputToggles[i].setNotificationPing(i == tabIndex && on);
94+
InputPanelHeader.inputToggles[i].setNotificationPing(
95+
i == tabIndex && on
96+
);
9597
}
9698
}
9799
}

0 commit comments

Comments
 (0)