diff --git a/.gitignore b/.gitignore index 9c22502f..c8b87a88 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ CMakeCache.txt *.clst *.snap node_modules -build \ No newline at end of file +build +*-lock.json \ No newline at end of file diff --git a/d.txt b/d.txt new file mode 100644 index 00000000..32bc3781 --- /dev/null +++ b/d.txt @@ -0,0 +1,14 @@ +On branch nxp +Your branch is ahead of 'nxp/master' by 2 commits. + (use "git push" to publish your local commits) + +Changes not staged for commit: + (use "git add ..." to update what will be committed) + (use "git restore ..." to discard changes in working directory) + modified: webusb/package.json + +Untracked files: + (use "git add ..." to include in what will be committed) + d.txt + +no changes added to commit (use "git add" and/or "git commit -a") diff --git a/webusb/index.js b/webusb/index.js new file mode 100644 index 00000000..82d6e3bd --- /dev/null +++ b/webusb/index.js @@ -0,0 +1,2 @@ +window.ZstdCodec = require('zstd-codec').ZstdCodec; +require("zstd-codec/lib/module.js").run((binding) => {console.log("running", binding); window.binding = binding} ) diff --git a/webusb/notes.txt b/webusb/notes.txt new file mode 100644 index 00000000..3a60a88e --- /dev/null +++ b/webusb/notes.txt @@ -0,0 +1,5 @@ +errors you keep running into: + +must init git submodule for zstd +must start the emsdk thing to use emcc in terminal +updating node version to do serve -s build \ No newline at end of file diff --git a/webusb/package.json b/webusb/package.json index befb1d02..1b5db90e 100644 --- a/webusb/package.json +++ b/webusb/package.json @@ -3,26 +3,24 @@ "version": "0.1.0", "private": true, "dependencies": { + "-": "^0.0.1", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "fs": "^0.0.1-security", + "g": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "^5.0.1", - "web-vitals": "^2.1.4" + "web-vitals": "^2.1.4", + "zstd-codec": "^0.1.4" }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "react-scripts build; browserify index.js -o build/bundle.js -t babelify --presets es2015; ", "test": "react-scripts test", "eject": "react-scripts eject" }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, "browserslist": { "production": [ ">0.2%", @@ -35,5 +33,8 @@ "last 1 safari version" ] }, - "proxy": "http://localhost:5000" + "devDependencies": { + "@babel/core": "^7.22.9", + "babelify": "^10.0.0" + } } diff --git a/webusb/public/index.html b/webusb/public/index.html index 690b31d0..d83fa86b 100644 --- a/webusb/public/index.html +++ b/webusb/public/index.html @@ -25,8 +25,14 @@ Learn how to configure a non-root public URL by running `npm run build`. --> React App + + + +
+ +