Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP] Cleans up Envify bundler process #30

Merged
merged 13 commits into from
Sep 13, 2022
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,31 @@ Compile TypeScript dependencies:
yarn tsc:chroma-js
```

Build the game:
Install NPM dependencies:
```
yarn install --dev
```

Build the game:
```
# Mac / Linux:
FIREBASE_URL=<my-firebase-url> yarn build

# Windows:
$env:FIREBASE_URL = '<my-firebase-url>'
yarn build
```

The above build command builds the game and its required resources for the first time, which will take a few minutes. Use it when making changes to resources like cards, codex data, cosmetics, etc.

Once the initial build is done, you can save time by rebuilding only the app (takes about 50 seconds):
```
yarn build:app
# Mac / Linux:
FIREBASE_URL=<my-firebase-url> yarn build:app

# Windows:
$env:FIREBASE_URL = '<my-firebase-url>'
yarn build
```

Or rebuild only the HTML/CSS and localization files (takes about 5 seconds):
Expand All @@ -62,9 +76,4 @@ When working in the `server` or `worker` directories, no rebuilds are needed. Se

#### Contributing

If you'd like to contribute to Duelyst, check the open issues for project ideas, such as:

- Getting local single player working via `docker compose up`
- Getting a reference deployment working
- Converting part of the code from CoffeeScript to JavaScript (see `decaffeinate`)
- Rewriting part of the code in TypeScript
If you'd like to contribute to Duelyst, check the [open issues](https://github.com/open-duelyst/duelyst/issues) for project ideas.
3 changes: 1 addition & 2 deletions app/application.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -570,14 +570,13 @@ App.main = ->

# # check in profile storage if the user has accepted terms
# if !ProfileManager.getInstance().get(storageAcceptedEula)
# # TODO - This is not actually good, but we need to make a new terms and conditions page to replace BNEA one
# # TODO - This is not actually good, but we need to make a new terms and conditions page
# return App._showTerms()
# # user has accepted, check if they have sent notification
# else
# if !ProfileManager.getInstance().get(storageSentAcceptedEulaNotify)
# ProfileManager.getInstance().set(storageSentAcceptedEulaNotify, true)


# check for an active game
lastGameModel = null
if GamesManager.getInstance().playerGames.length > 0
Expand Down
2 changes: 0 additions & 2 deletions app/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,6 @@ CONFIG.HIDE_SFX_PRIORITY = 6;
CONFIG.ERROR_SFX_PRIORITY = 7;
CONFIG.MAX_SFX_PRIORITY = 9999;

CONFIG.paypalButtons = process.env.PAYPAL_BUTTONS;

// global scale - scale of game relative to resolution
// set dynamically on resize
CONFIG.globalScale = 1.0;
Expand Down
7 changes: 5 additions & 2 deletions app/common/landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ function shouldRedirect() {
return true;
}

// redirect to the landing page, URL set via process.env.config
// redirect to the landing page, URL set via process.env config
function redirect() {
const redirectUrl = process.env.LANDING_PAGE_URL;
let redirectUrl = process.env.LANDING_PAGE_URL;
if (redirectUrl === '') {
redirectUrl = '/';
}
debug(`redirect to ${redirectUrl}`);
Storage.set('redirected', true);
return window.location.replace(redirectUrl);
Expand Down
1 change: 0 additions & 1 deletion app/data/shop-paypal-buttons-production.json

This file was deleted.

Loading