|
1 |
| -# angular-4-ngx-rocket |
2 |
| -ngx rocket |
| 1 | +# angular 4 ngx rocket |
| 2 | + |
| 3 | +This project was generated with [ngX-Rocket](https://github.com/ngx-rocket/generator-ngx-rocket/) |
| 4 | +version 2.3.0 |
| 5 | + |
| 6 | +# Getting started |
| 7 | + |
| 8 | +1. Go to project folder and install dependencies: |
| 9 | + ```bash |
| 10 | + npm install |
| 11 | + ``` |
| 12 | + |
| 13 | +2. Launch development server, and open `localhost:4200` in your browser: |
| 14 | + ```bash |
| 15 | + npm start |
| 16 | + ``` |
| 17 | + |
| 18 | +# Project structure |
| 19 | + |
| 20 | +``` |
| 21 | +dist/ web app production build |
| 22 | +docs/ project docs and coding guides |
| 23 | +e2e/ end-to-end tests |
| 24 | +src/ project source code |
| 25 | +|- app/ app components |
| 26 | +| |- core/ core module (singleton services and single-use components) |
| 27 | +| |- shared/ shared module (common components, directives and pipes) |
| 28 | +| |- app.component.* app root component (shell) |
| 29 | +| |- app.module.ts app root module definition |
| 30 | +| |- app-routing.module.ts app routes |
| 31 | +| +- ... additional modules and components |
| 32 | +|- assets/ app assets (images, fonts, sounds...) |
| 33 | +|- environments/ values for various build environments |
| 34 | +|- theme/ app global scss variables and theme |
| 35 | +|- translations/ translations files |
| 36 | +|- index.html html entry point |
| 37 | +|- main.scss global style entry point |
| 38 | +|- main.ts app entry point |
| 39 | +|- polyfills.ts polyfills needed by Angular |
| 40 | ++- test.ts unit tests entry point |
| 41 | +reports/ test and coverage reports |
| 42 | +proxy.conf.js backend proxy configuration |
| 43 | +``` |
| 44 | + |
| 45 | +# Main tasks |
| 46 | + |
| 47 | +Task automation is based on [NPM scripts](https://docs.npmjs.com/misc/scripts). |
| 48 | + |
| 49 | +Task | Description |
| 50 | +--------------------------------|-------------------------------------------------------------------------------------- |
| 51 | +`npm start` | Run development server on `http://localhost:4200/` |
| 52 | +`npm run build [-- --env=prod]` | Lint code and build web app for production (with [AOT](https://angular.io/guide/aot-compiler)) in `dist/` folder |
| 53 | +`npm test` | Run unit tests via [Karma](https://karma-runner.github.io) in watch mode |
| 54 | +`npm run test:ci` | Lint code and run unit tests once for continuous integration |
| 55 | +`npm run e2e` | Run e2e tests using [Protractor](http://www.protractortest.org) |
| 56 | +`npm run lint` | Lint code |
| 57 | +`npm run translations:extract` | Extract strings from code and templates to `src/app/translations/template.json` |
| 58 | +`npm run docs` | Display project documentation |
| 59 | + |
| 60 | +When building the application, you can specify the target environment using the additional flag `--env <name>` (do not |
| 61 | +forget to prepend `--` to pass arguments to npm scripts). |
| 62 | + |
| 63 | +The default build environment is `prod`. |
| 64 | + |
| 65 | +## Development server |
| 66 | + |
| 67 | +Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change |
| 68 | +any of the source files. |
| 69 | +You should not use `ng serve` directly, as it does not use the backend proxy configuration by default. |
| 70 | + |
| 71 | +## Code scaffolding |
| 72 | + |
| 73 | +Run `npm run generate -- component <name>` to generate a new component. You can also use |
| 74 | +`npm run generate -- directive|pipe|service|class|module`. |
| 75 | + |
| 76 | +If you have installed [angular-cli](https://github.com/angular/angular-cli) globally with `npm install -g @angular/cli`, |
| 77 | +you can also use the command `ng generate` directly. |
| 78 | + |
| 79 | +## Additional tools |
| 80 | + |
| 81 | +Tasks are mostly based on the `angular-cli` tool. Use `ng help` to get more help or go check out the |
| 82 | +[Angular-CLI README](https://github.com/angular/angular-cli). |
| 83 | + |
| 84 | +# What's in the box |
| 85 | + |
| 86 | +The app template is based on [HTML5](http://whatwg.org/html), [TypeScript](http://www.typescriptlang.org) and |
| 87 | +[Sass](http://sass-lang.com). The translation files use the common [JSON](http://www.json.org) format. |
| 88 | + |
| 89 | +#### Tools |
| 90 | + |
| 91 | +Development, build and quality processes are based on [angular-cli](https://github.com/angular/angular-cli) and |
| 92 | +[NPM scripts](https://docs.npmjs.com/misc/scripts), which includes: |
| 93 | + |
| 94 | +- Optimized build and bundling process with [Webpack](https://webpack.github.io) |
| 95 | +- [Development server](https://webpack.github.io/docs/webpack-dev-server.html) with backend proxy and live reload |
| 96 | +- Cross-browser CSS with [autoprefixer](https://github.com/postcss/autoprefixer) and |
| 97 | + [browserslist](https://github.com/ai/browserslist) |
| 98 | +- Asset revisioning for [better cache management](https://webpack.github.io/docs/long-term-caching.html) |
| 99 | +- Unit tests using [Jasmine](http://jasmine.github.io) and [Karma](https://karma-runner.github.io) |
| 100 | +- End-to-end tests using [Protractor](https://github.com/angular/protractor) |
| 101 | +- Static code analysis: [TSLint](https://github.com/palantir/tslint), [Codelyzer](https://github.com/mgechev/codelyzer), |
| 102 | + [Stylelint](http://stylelint.io) and [HTMLHint](http://htmlhint.com/) |
| 103 | +- Local knowledgebase server using [Hads](https://github.com/sinedied/hads) |
| 104 | + |
| 105 | +#### Libraries |
| 106 | + |
| 107 | +- [Angular](https://angular.io) |
| 108 | +- [Bootstrap 4](https://v4-alpha.getbootstrap.com) |
| 109 | +- [ng-bootsrap](https://ng-bootstrap.github.io/) |
| 110 | +- [Font Awesome](http://fontawesome.io) |
| 111 | +- [RxJS](http://reactivex.io/rxjs) |
| 112 | +- [ngx-translate](https://github.com/ngx-translate/core) |
| 113 | +- [Lodash](https://lodash.com) |
| 114 | + |
| 115 | +#### Coding guides |
| 116 | + |
| 117 | +- [Angular](docs/coding-guides/angular.md) |
| 118 | +- [TypeScript](docs/coding-guides/typescript.md) |
| 119 | +- [Sass](docs/coding-guides/sass.md) |
| 120 | +- [HTML](docs/coding-guides/html.md) |
| 121 | +- [Unit tests](docs/coding-guides/unit-tests.md) |
| 122 | +- [End-to-end tests](docs/coding-guides/e2e-tests.md) |
| 123 | + |
| 124 | +#### Other documentation |
| 125 | + |
| 126 | +- [I18n guide](docs/i18n.md) |
| 127 | +- [Working behind a corporate proxy](docs/corporate-proxy.md) |
| 128 | +- [Updating dependencies and tools](docs/updating.md) |
| 129 | +- [Using a backend proxy for development](docs/backend-proxy.md) |
| 130 | +- [Browser routing](docs/routing.md) |
0 commit comments