This document is intended to provide a development guideline for new and existing contributors to the project. Keep in mind this application undergoes constant development so be sure to check back occasionally as best practices are sure to evolve.
- Bundles SUI assets and places then in
../manageiq/public/ui/service/
.
- Compiles a list of languages for which the SUI is currently translated.
- Extracts all text in SUI flagged for translation, creates
./client/gettext/po/manageiq-ui-service.pot
used by Zanata.
- Starts the dev server, auto-reloads on asset change, runs on port 3000 by default. Can be prepended with enviromental
variables such as
PROXY_HOST=localhost:3000
.
- Bundles the SUI and uses karma to run all
.spec.js
files. Pass fail results are printed out during task execution and coverage at task completion.
- Runs
yarn test
and watch project files for changes, upon a change, automatically rerunsyarn test
. SUI is only bundled at the beginning of this task, subsequent runs only bundles changed files.
- ESLint and Sass Lint are both run with this script, this is automatically run by travis upon the creation of a pr.
For additional information regarding coding style and convention employed in this project checkout:
All dependencies are managed using Yarn. When adding a new dependency for use in the SUI there are two locations to pay attention to:
-
package.json - identifies resourcing and desired versions of app dependencies, confirm the correct version of the app you require is saved as a Developer Dependency, (
devDependencies
). When installing new dependencies be sure to install with an absolute version number:yarn add --dev dependency@version
-
app.js - is the entrypoint for webpack and makes dependencies available app wide, here you'll reference the
node_modules/
file path of those files you wish to include.
Note: Order matters, don't be reckless 👍 🌮
In efforts to build towards the future Angular 2.0,
employing components is now preferred over directives.
Much of the existing code base has already been refactored to take advantage of components, these elements are denoted:
with the .component.js
postfix. Find below a few examples for the benefit of extensibility:
In addition, a few choice supporting resources include: