From 71e2796f9e09ce4d8fcf05c093c824246fdb1a3d Mon Sep 17 00:00:00 2001 From: Kyle Baran Date: Thu, 16 Sep 2021 16:52:05 -0700 Subject: [PATCH] Publishing social package to npm --- packages/social/package.json | 7 +++++-- packages/social/scripts/update-name-gh-package.js | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 packages/social/scripts/update-name-gh-package.js diff --git a/packages/social/package.json b/packages/social/package.json index 220ff5b218..bddff4b0dd 100755 --- a/packages/social/package.json +++ b/packages/social/package.json @@ -1,7 +1,6 @@ { "name": "@xrengine/social", "version": "0.4.4", - "private": true, "repository": { "type": "git", "url": "git://github.com/XRFoundation/XREngine.git" @@ -9,6 +8,9 @@ "engines": { "node": ">= 16.3.0" }, + "publishConfig": { + "access": "public" + }, "npmClient": "npm", "jest": "ts-jest", "scripts": { @@ -16,7 +18,8 @@ "dev": "vite --host", "build": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=6144 vite build && cp src/server.js www/server.js", "validate": "npm run test", - "start": "cp src/server.js www/server.js && node www/server.js" + "start": "cp src/server.js www/server.js && node www/server.js", + "update-name-gh-package": "node scripts/update-name-gh-package.js" }, "resolutions": { "socket.io": "4.2.0", diff --git a/packages/social/scripts/update-name-gh-package.js b/packages/social/scripts/update-name-gh-package.js new file mode 100644 index 0000000000..9daf2694bc --- /dev/null +++ b/packages/social/scripts/update-name-gh-package.js @@ -0,0 +1,7 @@ +const fs = require('fs'); + +(() => { + const packageContents = JSON.parse(fs.readFileSync('./package.json').toString()); + packageContents.name = '@XRFoundation/social'; + fs.writeFileSync('./package.json', Buffer.from(JSON.stringify(packageContents))); +})(); \ No newline at end of file