Since you most likely found this template on GitHub, it assumes you are a GitHub User. If you are using a different version control system for your application then you will need to change some URLs in your package.json
file.
To start your project, you should find and replace the following symbols project-wide in VS Code by hitting crtl-shift-f
(or command-shift-f
on macOS):
YOUR_GITHUB_USER
=> your github usernameYOUR_GITHUB_REPO
=> your application's github repository nameyour-package-name
=> your application's npm package nameYOUR_APP_SHORT_NAME
=> your application's shortened nameYOUR_PRODUCT_NAME
=> your application's human-readable product nameYOUR_APPLICATION_DESCRIPTON
=> your application's human-readable short descriptionYOUR_NAME
=> your human nameYOUR_EMAIL_ADDRESS
=> your email address
- VS Code download
- yarn (run
npm i yarn -g
)
- XCode macOS App Store
- cocoapods (run
sudo gem install cocoapods
) - an iOS developer account, if you want to publish to the App Store
- Android Studio download
- a developer account, if you want to publish to the App Store
This is a Phaser 3 starter with TypeScript, Rollup with ⚡️ lightning fast HMR through Vite.
Command | Description |
---|---|
yarn |
Install project dependencies |
yarn clean |
Rebuild everything from scratch except your source code (src ) and assets (assets ) |
yarn build |
Builds code bundle with production settings |
yarn dev |
Builds project and open web server, watching for changes |
yarn redev |
clean, install, build, and dev |
yarn serve |
Run a web server to serve built code bundle from dist folder |
yarn cap-prepare |
add android and ios support to capacitor |
yarn cap-a |
sync Android build and open Android Studio simulator |
yarn cap-i |
sync iOS build and open XCode iOS simulator |
yarn build-a |
build and sync for Android |
yarn build-i |
build and sync for iOS |
After cloning the repo, run yarn redev
from your project directory. (Only the first time or if you wnt to reinstall your dependencies - yarn dev
does the real work.) Then, you can start the local development and navigate to http://localhost:3000.
After running yarn build
, the files you need for production will be on the dist
folder. To test code on your dist
folder, run yarn serve
and navigate to http://localhost:5000. To build and publish your Android or iOS applications, you will need to run yarn cap-prepare
and then either yarn cap-a
, or yarn cap-i
. You can complete the build process from XCode or Android Studio.