Official Website | Subscribe to Youtube Channel
For install the dependencies npm install
.
Note: In case you are running issues becase the Macs M1/Intel chip variations try deleting package.lock and install again.
For run on web browser npm run start
In order to run on Emulator you need to run: npm run sync:app
and npm run build:app
To run using iOS: npm run ios:app
To run using Android npm run android:app
To turn on/off debug mode (the boxes) go to phaser-singleton.module.ts and toggle the arcade 'debug:false/debug:true'
This project uses Ionic Framework for the majority of screens and overlays; and uses Phaser for the gameplay itself. Please see corresponding documentation on their respective websites.
For more detailed information on licensing, see the LICENSE.md file included in the repository
To run the license checker, use
npx license-checker --summary
or vanilla npx license-checker
Most of the commands to generate projects/capabilities/apps are default to NX, Ionic, or Angular (in that order), so we will NOT include their specific instructions since as the packages update so will the documentation.
With that said, there are some special things to keep in mind...
After any project is created by NX, we MUST add StyleLint
nx g nx-stylelint:configuration --project
The normal NX command to generate an app is nx g @nx/react:app my-app
; however, there are some special steps to generate an Ionic App. These are defined well in Eric Jeker's post here
When using Nx, you can create multiple applications and libraries in the same workspace.
We are using Capacitor to run the project in mobile. We configured Capacitor to be able to run in monorepos, so if you want to add capacitor into your application follow this steps:
- Make sure you have run
nx build your-app-name
(Whereyour-app-name
will be the name of your application). - Make sure your application has the
package.json
created, if not create one at the root of you application folderapps/your-application-folder
and add the folowing properties:"name": your-app-name
,"version": "0.0.0"
,"licence: "MIT""
,"private: true"
,"dependencies: {}"
,"devDependencies": {}
(whereyour-app-name
will be replaced with your currently application name). - Go to
apps/your-app-name
and runnpm install @capacitor/cli --save-dev
, then runnpm install @capacitor/core
. - Nowe it's time to initialize Capacitor. Go to
apps/your-app-name
and runnpx cap init
. - In the project root folder, search for the
ionic.config.json
file and addyour-app-name
as a new project in theprojects
array. You can copy&paste the example one and just replace all instances.
- At the root of your project, run
ionic capacitor add platform --project=your-app-name
(Whereplatform
could beios
|android
) (Whereyour-project-name
will be the project name you set into theionic.config.json
file).
- Run
nx build your-app-name
(Whereyour-app-name
will be the name of your application). - Run
cd apps/your-app-name && npx cap copy
. - Run
cd apps/your-app-name && npx cap sync
. - Run
cd apps/your-app-name && npx cap open platform
. (Whereplatform
could beios
|android
)
Visit the Nx Documentation to learn more.
Run nx g @nx/react:lib my-lib
to generate a library.
You can also use any of the plugins above to generate libraries as well.
Libraries are shareable across libraries and applications. They can be imported from @rock-the-steps/mylib
.
Run nx g @nx/angular:component my-component --project=my-app
to generate a new component.
Run nx test my-app
to execute the unit tests via Jest.
Run nx affected:test
to execute the unit tests affected by a change.
Run ng e2e my-app
to execute the end-to-end tests via Cypress.
Run nx affected:e2e
to execute the end-to-end tests affected by a change.
Run nx dep-graph
to see a diagram of the dependencies of your projects.