Skip to content

Commit a5e2686

Browse files
committed
successful build, untested
1 parent 0ff9135 commit a5e2686

20 files changed

+5603
-39
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,31 @@ nvm install 18.15
99
nvm use 18
1010
```
1111

12+
13+
To build the library, run the following commands:
14+
```
15+
cd package
16+
npm install
17+
npm run build
18+
```
19+
This will create a build in the dist folder.
20+
21+
22+
Open `test/index.html` in the browser to see the build working.
23+
24+
1225
## Process
13-
I built the library using Webpack:
26+
I am building the library using Webpack:
1427
```
1528
npm install --save-dev webpack webpack cli
1629
```
17-
Then I created package.json using `npm init`.
30+
31+
I also created package.json using `npm init` and set up a basic config file for a library build named `webpack.config.js`. I configured package.json so I could run webpack with `npm run build`.
32+
33+
34+
35+
From the original ml5 library's `src` folder, I copied over all source files from the `NeuralNetwork` directory and necessary dependency files from `utils` directory. I then installed `@tensorflow/[email protected]`, `@tensorflow/[email protected]`, and `[email protected]` with npm.
36+
37+
At this point, the library can be built without error. I was only getting an error about exceeding recommended size limit. For the build, I am using the latest version of node and npm dependencies. It seems like NeuralNetwork does not have any problems with that.
38+
39+

package/index.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)