Skip to content

Commit 1c52249

Browse files
committed
add dev server
1 parent e78c371 commit 1c52249

File tree

6 files changed

+2492
-35
lines changed

6 files changed

+2492
-35
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,26 @@ nvm install 18.15
88
nvm use 18
99
```
1010

11-
To build the library, run the following commands:
11+
To start the development server, run the following commands:
1212

1313
```
1414
npm install
15-
npm run build
15+
npm start
1616
```
1717

18-
This will create the build in the dist folder.
18+
You should see something similar to this in the terminal:
1919

20-
Open `examples/NeuralNetwork/index.html` in the browser to see the build running an example from the ml5 website.
20+
```
21+
[webpack-dev-server] Project is running at:
22+
[webpack-dev-server] Loopback: http://localhost:8080/
23+
...
24+
...
25+
webpack 5.76.1 compiled successfully in 8360 ms
26+
```
27+
28+
A local server have been started and hosts a built version of the ml5 library at http://localhost:8080/ml5.js. While the server is running, Webpack will automatically rebuild the library if you change and save any file in the `/src` folder.
29+
30+
Open `examples/NeuralNetwork/index.html` in the browser to see the live build of `ml5.js` working in some example code.
2131

2232
## Code Formatting
2333

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ml5-neuralnetwork-test-build
1+
# ml5-next-gen
22

33
Welcome to the next-generation repo for the ml5.js project! Due to the complexities inherent in updating all the dependencies in [the original repo](https://github.com/ml5js/ml5-library), we're exploring rebuilding from the ground up. This fresh repository allows us to migrate over classes and functions one at a time. This is very much a work in progress and is currently in its early, experimental stage. We appreciate your patience as we work towards refining this next evolution of the ml5.js project. Stay tuned!
44

@@ -12,13 +12,23 @@ nvm install 18.15
1212
nvm use 18
1313
```
1414

15-
To build the library, run the following commands:
15+
To start the development server, run the following commands:
1616

1717
```
1818
npm install
19-
npm run build
19+
npm start
2020
```
2121

22-
This will create the build in the dist folder.
22+
You should see something similar to this in the terminal:
2323

24-
Open `examples/NeuralNetwork/index.html` in the browser to see the build running an example from the ml5 website.
24+
```
25+
[webpack-dev-server] Project is running at:
26+
[webpack-dev-server] Loopback: http://localhost:8080/
27+
...
28+
...
29+
webpack 5.76.1 compiled successfully in 8360 ms
30+
```
31+
32+
A local server have been started and hosts a built version of the ml5 library at http://localhost:8080/ml5.js. While the server is running, Webpack will automatically rebuild the library if you change and save any file in the `/src` folder.
33+
34+
Open `examples/NeuralNetwork/index.html` in the browser to see the live build of `ml5.js` working in some example code.

examples/NeuralNetwork/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Document</title>
8-
<script src="../../dist/ml5.js"></script>
8+
<script src="http://localhost:8080/ml5.js"></script>
99
</head>
1010
<body>
1111
<script src="script.js"></script>

0 commit comments

Comments
 (0)