This is a quick guide on how to contribute code changes and PR to some of the core Ember.js packages. The Fleetbase Console is built on Ember.js framework and Ember Engines, as such the Console depends on two primary packages which provide the interface and core services, utilities, helpers etc.
To develop and make changes to a core package is actually quite simple. Follow the following step by step guide to setup the development environment.
git clone git@github.com:fleetbase/fleetbase.git
cd fleetbase
git submodule update --init --recursive
docker-compose up -d
docker-compose stop console
cd console
This is the first few steps to setting up the development environment to contributing to the console and it's core packages. Next you'll need to point the console to the local packages instead of the npm published packages. To do this you'll need to open the package.json.
Open package.json and find the dependency for @fleetbase/ember-core and @fleetbase/ember-ui change their version value like so below:
{
"dependencies": {
"@fleetbase/ember-core": "link:../packages/ember-core",
"@fleetbase/ember-ui": "link:../packages/ember-ui",
}
}
Once you've done this step you'll need to reinstall the packages, afterwards the packages will be symlinked to the local path and you'll be able to run the console locally to make changes, test and build. Be sure to create your own branch in whichever package you're making changes to so that you can submit a PR when you've completed.
To do this use the following commands
rm pnpm-lock.json
pnpm install
pnpm start
The previous commands will install the packages from the directory and start the development environment available at http://localhost:4200 - when you make changes the console should autoreload so you can view and test.
Do not push on main or dev-main branch, which you should not be able to. To create your own branch use the following git command.
git checkout -b my-feature-branch
Once you are done be sure to run the following commands to make sure your branch will be able to pass PR review.
pnpm lint && pnpm build