Giter Club home page Giter Club logo

parcel-plugin-playcanvas's Introduction

parcel-plugin-playcanvas

This parcel 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, 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 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/snowfrogdev/typescript-playcanvas-template

Thank you!

parcel-plugin-playcanvas's People

Contributors

dependabot[bot] avatar hxhieu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.