This document describes how to set up your development environment to build and develop stellar.
- Prerequisite Software
- Code Editor
- Getting the Sources
- Installing NPM Modules
- Start Development Server
- Building For Production
- Cleaning
Before you can run stellar you must install and configure the following products on your development machine:
-
Git and/or the GitHub app; GitHub's Guide to Installing Git is a good source of information.
-
Node.js LTS which is used to run a development web server, and generate distributable files. We recommend using the Node Version Manager (NVM) to install Node.js and NPM on your machine. Once you have NVM installed you can use the required Node.js/NPM versions via:
cd stellar nvm use
The recommended editor for developing stellar is VS Code with the following settings and extensions. You can easily use another editor of your choice as long as you can replicate the code formatting settings.
Your editor should follow the same settings found in .vscode/settings.json.
- Svelte for VS Code
- Prettier - Code formatter
- ESLint
- Stylelint
- EditorConfig for VS Code
- Path Intellisense
- Code Spell Checker
- Task Explorer
Clone the stellar repository:
git clone https://github.com/nasa-jpl/stellar.git
cd stellar
Install the JavaScript modules needed to build stellar:
npm install
Any changes made to the CSS package locally must first be built via npm run build:css
or the VSCode Task: Build CSS
To preview the changes, open packages/css/example/index.html in a browser.
To run the React package for development:
npm run dev:react
(VSCode Task: React
)
For more details, view the README for the package
To run the Svelte package for development:
npm run dev:svelte
(VSCode Task: Svelte
)
For more details, view the README for the package
Run npm run build
(VSCode Task: Build
) to build a production version of the project. The built artifacts for each package will be stored in the dist/
directory under their respective workspaces.