diff --git a/npm/react-webgl2/README.md b/npm/react-webgl2/README.md new file mode 100644 index 0000000..e69de29 diff --git a/npm/react-webgl2/package.json b/npm/react-webgl2/package.json new file mode 100644 index 0000000..43acb6f --- /dev/null +++ b/npm/react-webgl2/package.json @@ -0,0 +1,26 @@ +{ + "name": "@rive-app/react-webgl2", + "version": "4.8.3", + "description": "React wrapper around the @rive-app/webgl2 library", + "main": "dist/index.js", + "typings": "dist/types/index.d.ts", + "files": [ + "dist/**" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/rive-app/rive-react.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/rive-app/rive-react/issues" + }, + "homepage": "https://github.com/rive-app/rive-react#readme", + "dependencies": { + "@rive-app/webgl2": "2.10.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } +} \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh index 787622b..f7543e2 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,6 +6,7 @@ set -e cp -r ./dist ./npm/react-webgl cp -r ./dist ./npm/react-canvas cp -r ./dist ./npm/react-canvas-lite +cp -r ./dist ./npm/react-webgl2 echo "Replacing the canvas with webgl references in react-webgl" pushd ./npm/react-webgl/dist @@ -18,6 +19,17 @@ else fi popd +echo "Replacing the canvas with webgl2 references in react-webgl2" +pushd ./npm/react-webgl2/dist +if [[ "$OSTYPE" == "darwin"* ]]; then + find . -type f -name "*.ts" -print0 | xargs -0 sed -i '' -e 's/@rive-app\/canvas/@rive-app\/webgl2/g' + find . -type f -name "*.js" -print0 | xargs -0 sed -i '' -e 's/@rive-app\/canvas/@rive-app\/webgl2/g' +else + find . -type f -name "*.ts" -print0 | xargs -0 sed -i -e 's/@rive-app\/canvas/@rive-app\/webgl2/g' + find . -type f -name "*.js" -print0 | xargs -0 sed -i -e 's/@rive-app\/canvas/@rive-app\/webgl2/g' +fi +popd + echo "Replacing the canvas with canvas-lite references in react-canvas-lite" pushd ./npm/react-canvas-lite/dist if [[ "$OSTYPE" == "darwin"* ]]; then