https://github.com/hxhieu/parcel-plugin-playcanvas
A parcel plugin to upload the bundle to PlayCanvas project asset.
https://github.com/hxhieu/parcel-plugin-playcanvas
local local-dev local-development parcel parcel-bundler parcel-plugin parceljs playcanvas playcanvas-scripts
Last synced: 5 months ago
JSON representation
A parcel plugin to upload the bundle to PlayCanvas project asset.
- Host: GitHub
- URL: https://github.com/hxhieu/parcel-plugin-playcanvas
- Owner: hxhieu
- License: mit
- Created: 2020-04-27T10:15:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-07-22T06:53:37.000Z (11 months ago)
- Last Synced: 2025-10-11T16:59:54.010Z (8 months ago)
- Topics: local, local-dev, local-development, parcel, parcel-bundler, parcel-plugin, parceljs, playcanvas, playcanvas-scripts
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# parcel-plugin-playcanvas
This [parcel](https://parceljs.org/) plugin will upload the bundle to PlayCanvas project asset. Then it would help the local development workflow i.e. Local IDE > Parcel bundler > Auto update / hot reload PlayCanvas scripts.
> This works with PlayCanvas script 2.0 since they have removed the local server development!
# How to use
- `npm install --save-dev parcel-plugin-playcanvas` or `yarn add -D parcel-plugin-playcanvas` on your main project
- The main project should use **parcel** as the bundler, recommend my other [playcanvas-typescript-template](https://github.com/hxhieu/playcanvas-typescript-template), with only ONE output file for example `parcel build ./src/index.ts -o bundle.js`
- Need these env vars set so the plugin can authorise with PlayCanvas
- `PLAYCANVAS_PROJECT_ID`
- `PLAYCANVAS_ASSET_ID`
- `PLAYCANVAS_ACCESS_TOKEN`
Please follow [https://github.com/whydoidoit/babel-playcanvas-template](https://github.com/whydoidoit/babel-playcanvas-template#building-debugging-and-testing-your-code) on how to get the above
- That's it and **parcel** will do the rest!
```
$ parcel build ./src/index.ts -o bundle.js
✨ Built in 162ms.
dist/bundle.js.map 7.14 KB 18ms
dist/bundle.js 4.51 KB 37ms
Uploading script bundle to PlayCanvas... DONE!
✨ Done in 2.96s.
```
# Inspiration and credits
[https://github.com/whydoidoit/babel-playcanvas-template](https://github.com/whydoidoit/babel-playcanvas-template)
[https://github.com/snowfrogdev/typescript-playcanvas-template](https://github.com/snowfrogdev/typescript-playcanvas-template)
Thank you!