All instructions below are tested to work for:
- MacOS
- Windows
-
Clone this repo locally.
git clone https://github.com/flexport/flexport-earth.git
-
Fork this repo. in github click the fork icon in the upper right.
-
cd flexport-earth
-
Update your remotes replacing with your github username:
git remote set-url --push origin https://github.com/<your-username-here>/flexport-earth.git
Note:
Your commits must be be verified to be merged to the main branch.
If running on Windows, install the Windows Subsystem for Linux first.
-
If you get the following message " can’t be opened because Apple cannot check it for malicious software." please do the following: Open System Settings in the left hand nav select "Privacy & Security" in the right hand section scroll down to the Security section. there will be an entry for was blocked from use because it is not from an identified developer. click open Anyway enter login credentials. click Open. installer should now run
pwsh
./dev BuildRelease
Note: This will also execute the unit and component tests.
The NextJS frontend can be started in dev mode by running:
./dev StartWebsiteLocallyDevMode
The NextJS frontend can be started in production mode by running:
./dev StartWebsiteLocallyProdMode
./dev RunE2ETests
Note: Will need to open a new terminal window for this after starting the website locally.
You can optionally use / test Google Analytics in your personal development environment.
First you will need to create your own presonal Google Analytics account, see here for how to do that.
Then configure your Google Analytics Measurement ID in your local configuration.
If this is your first time running Earth, simply executing any of the development scripts will prompt you for this (and other configuration settings) at which point you can input this ID.
If you've previously executed Earth, then you can set the value in your local configuration.
You'll need an Azure subscription to deploy to. Once you have one, you can follow the steps below.
For provisioning new Azure Accounts, Tenants, and Subscriptions, continue here.
./dev DeployToAzure
./dev DestroyAzureEnvironment
Once you've made some changes and committed them, you can push them remotely using the push script:
./dev Push
Continue reading here on how to develop for Flexport Earth.