Covid has impacted us in many ways. Whether it's economy, job, anxiety, staying away, lost their loved ones, some are ill. We all are having a hard time, in one way or another. But there is always a positive aspect to every negative situation out there. Such times demand better you. Doctors, nurses, delivery guys, and every frontline worker today is doing what is required. And being a developer, informing and making people aware is the least that I can do. #ConfinedButNotBroken
My mission is to make people aware of the current situation and its aftermath. So, we all can take effective measures for the global pandemic that we are facing today and help the one in need. I tried to bring all the information together that made me fight through this time. We all are in this together. #WeAreTogether #JourneyIsOn
- Go to project folder and install dependencies:
npm install
- Launch development server, and open
localhost:4200
in your browser:
npm start
dist/ web app production build
docs/ project docs and coding guides
e2e/ end-to-end tests
src/ project source code
|- app/ app components
| |- core/ core module (singleton services and single-use components)
| |- shared/ shared module (common components, directives and pipes)
| |- app.component.* app root component (shell)
| |- app.module.ts app root module definition
| |- app-routing.module.ts app routes
| +- ... additional modules and components
|- assets/ app assets (images, fonts, sounds...)
|- environments/ values for various build environments
|- theme/ app global scss variables and theme
|- translations/ translations files
|- index.html html entry point
|- main.scss global style entry point
|- main.ts app entry point
|- polyfills.ts polyfills needed by Angular
+- test.ts unit tests entry point
reports/ test and coverage reports
proxy.conf.js backend proxy configuration
Task automation is based on NPM scripts.
Task | Description |
---|---|
npm start |
Run development server on http://localhost:4200/ |
npm run serve:sw |
Run test server on http://localhost:4200/ with service worker enabled |
npm run build [-- --configuration=production] |
Lint code and build web app for production (with AOT) in dist/ folder |
npm test |
Run unit tests via Karma in watch mode |
npm run test:ci |
Lint code and run unit tests once for continuous integration |
npm run e2e |
Run e2e tests using Protractor |
npm run lint |
Lint code |
npm run translations:extract |
Extract strings from code and templates to src/app/translations/template.json |
npm run docs |
Display project documentation and coding guides |
npm run prettier |
Automatically format all .ts , .js & .scss files |
When building the application, you can specify the target configuration using the additional flag
--configuration <name>
(do not forget to prepend --
to pass arguments to npm scripts).
The default build configuration is prod
.
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change
any of the source files.
You should not use ng serve
directly, as it does not use the backend proxy configuration by default.
All .ts
, .js
& .scss
files in this project are formatted automatically using Prettier,
and enforced via the test:ci
script.
A pre-commit git hook has been configured on this project to automatically format staged files, using (pretty-quick)[https://github.com/azz/pretty-quick], so you don't have to care for it.
You can also force code formatting by running the command npm run prettier
.
Development, build and quality processes are based on angular-cli and NPM scripts, which includes:
- Optimized build and bundling process with Webpack
- Development server with backend proxy and live reload
- Cross-browser CSS with autoprefixer and browserslist
- Asset revisioning for better cache management
- Unit tests using Jasmine and Karma
- End-to-end tests using Protractor
- Static code analysis: TSLint, Codelyzer, Stylelint and HTMLHint
- Local knowledgebase server using Hads
- Automatic code formatting with Prettier