Skip to content

Commit 13384c0

Browse files
author
AKKA\Mehdi.FORMISANO-SELA
committed
Initial commit
0 parents  commit 13384c0

File tree

146 files changed

+30357
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+30357
-0
lines changed

.angular-cli.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"project": {
4+
"name": "cnes"
5+
},
6+
"apps": [
7+
{
8+
"root": "src",
9+
"outDir": "dist",
10+
"assets": [
11+
"assets",
12+
"favicon.ico",
13+
"robots.txt",
14+
"mock-data"
15+
],
16+
"index": "index.html",
17+
"main": "main.ts",
18+
"polyfills": "polyfills.ts",
19+
"test": "test.ts",
20+
"tsconfig": "tsconfig.app.json",
21+
"testTsconfig": "tsconfig.spec.json",
22+
"prefix": "app",
23+
"styles": [
24+
"../node_modules/primeng/resources/themes/omega/theme.css",
25+
"../node_modules/font-awesome/css/font-awesome.min.css",
26+
"../node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
27+
"main.scss"
28+
],
29+
"scripts": [
30+
"../node_modules/jquery/dist/jquery.min.js",
31+
"../node_modules/plotly.js/dist/plotly.min.js",
32+
"../node_modules/Mizar/Mizar.min.js"
33+
],
34+
"environmentSource": "environments/environment.ts",
35+
"environments": {
36+
"dev": "environments/environment.ts",
37+
"prod": "environments/environment.prod.ts"
38+
}
39+
}
40+
],
41+
"e2e": {
42+
"protractor": {
43+
"config": "./protractor.conf.js"
44+
}
45+
},
46+
"lint": [
47+
{
48+
"project": "src/tsconfig.app.json"
49+
},
50+
{
51+
"project": "src/tsconfig.spec.json"
52+
},
53+
{
54+
"project": "e2e/tsconfig.e2e.json"
55+
}
56+
],
57+
"test": {
58+
"karma": {
59+
"config": "./karma.conf.js"
60+
}
61+
},
62+
"defaults": {
63+
"styleExt": "scss",
64+
"component": {}
65+
}
66+
}

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
max_line_length = 120
12+
13+
[*.md]
14+
max_line_length = off
15+
trim_trailing_whitespace = false

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nodes_modules/
2+
node_modules/
3+
documentation/
4+

.htmlhintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"tagname-lowercase": false,
3+
"attr-lowercase": false,
4+
"attr-value-double-quotes": true,
5+
"tag-pair": true,
6+
"spec-char-escape": true,
7+
"id-unique": true,
8+
"src-not-empty": true,
9+
"attr-no-duplication": true,
10+
"title-require": true,
11+
"tag-self-close": true,
12+
"head-script-disabled": true,
13+
"doctype-html5": true,
14+
"id-class-value": "dash",
15+
"style-disabled": true,
16+
"inline-style-disabled": true,
17+
"inline-script-disabled": true,
18+
"space-tab-mixed-disabled": "true",
19+
"id-class-ad-disabled": true,
20+
"attr-unsafe-chars": true
21+
}

.npmignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
8+
# Dependencies
9+
/node_modules
10+
11+
# Cordova
12+
/www
13+
/plugins
14+
/platforms
15+
16+
# IDEs and editors
17+
.idea/*
18+
!.idea/runConfigurations/
19+
!.idea/codeStyleSettings.xml
20+
.project
21+
.classpath
22+
.c9/
23+
*.launch
24+
.settings/
25+
xcuserdata/
26+
*.sublime-workspace
27+
28+
# IDE - VSCode
29+
.vscode/*
30+
!.vscode/settings.json
31+
!.vscode/tasks.json
32+
!.vscode/launch.json
33+
!.vscode/extensions.json
34+
35+
# Maven
36+
/target
37+
/log
38+
39+
# Misc
40+
/.sass-cache
41+
/connect.lock
42+
/coverage/*
43+
/libpeerconnection.log
44+
npm-debug.log
45+
testem.log
46+
/typings
47+
/reports
48+
/src/translations/template.*
49+
/src/environments/.env.json
50+
51+
# E2E
52+
/e2e/*.js
53+
/e2e/*.map
54+
55+
# System Files
56+
.DS_Store
57+
Thumbs.db

.stylelintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"extends": ["stylelint-config-standard", "stylelint-config-recommended-scss"],
3+
"rules": {
4+
"font-family-name-quotes": "always-where-recommended",
5+
"function-url-quotes": ["always", { "except": ["empty"] }],
6+
"selector-attribute-quotes": "always",
7+
"string-quotes": "double",
8+
"max-nesting-depth": 3,
9+
"selector-max-compound-selectors": 3,
10+
"selector-max-specificity": "0,3,2",
11+
"declaration-no-important": true,
12+
"at-rule-no-vendor-prefix": true,
13+
"media-feature-name-no-vendor-prefix": true,
14+
"property-no-vendor-prefix": true,
15+
"selector-no-vendor-prefix": true,
16+
"value-no-vendor-prefix": true,
17+
"no-empty-source": null,
18+
"selector-class-pattern": "[a-z-]+",
19+
"selector-id-pattern": "[a-z-]+",
20+
"selector-max-id": 0,
21+
"selector-no-qualifying-type": true,
22+
"selector-max-universal": 0,
23+
"unit-whitelist": ["px", "%", "rem", "vw", "vh", "deg"],
24+
"max-empty-lines": 2,
25+
"max-line-length": 120
26+
}
27+
}

.yo-rc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"generator-ngx-rocket": {
3+
"version": "2.0.0",
4+
"props": {
5+
"appName": "CNES",
6+
"target": [
7+
"web"
8+
],
9+
"ui": "bootstrap",
10+
"auth": false,
11+
"projectName": "cnes",
12+
"mobile": [],
13+
"webview": []
14+
}
15+
}
16+
}

README.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# CNES
2+
3+
This project was generated with [ngX-Rocket](https://github.com/ngx-rocket/generator-ngx-rocket/)
4+
version 2.0.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 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+
- [Plotly](https://plot.ly/javascript/)
115+
- [Ng2 Toastr](https://github.com/PointInside/ng2-toastr)
116+
- [Primeng](https://www.primefaces.org/primeng/#/slider)
117+
- [Mizar](https://github.com/MizarWeb/Mizar)
118+
119+
#### Coding guides
120+
121+
- [Angular](docs/coding-guides/angular.md)
122+
- [TypeScript](docs/coding-guides/typescript.md)
123+
- [Sass](docs/coding-guides/sass.md)
124+
- [HTML](docs/coding-guides/html.md)
125+
- [Unit tests](docs/coding-guides/unit-tests.md)
126+
- [End-to-end tests](docs/coding-guides/e2e-tests.md)
127+
128+
#### Other documentation
129+
130+
- [I18n guide](docs/i18n.md)
131+
- [Working behind a corporate proxy](docs/corporate-proxy.md)
132+
- [Updating dependencies and tools](docs/updating.md)
133+
- [Using a backend proxy for development](docs/backend-proxy.md)
134+
- [Browser routing](docs/routing.md)

browserslist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List of supported browsers, for autoprefixer
2+
# See https://github.com/ai/browserslist
3+
4+
Last 2 versions
5+
> 1%

e2e/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('app', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display hello message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Hello world !');
13+
});
14+
});

e2e/app.po.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Use the Page Object pattern to define the page under test.
3+
* See docs/coding-guide/e2e-tests.md for more info.
4+
*/
5+
6+
import { browser, element, by } from 'protractor';
7+
8+
export class AppPage {
9+
constructor() {
10+
// Forces default language
11+
this.navigateTo();
12+
browser.executeScript(() => localStorage.setItem('language', 'en-US'));
13+
}
14+
15+
navigateTo() {
16+
return browser.get('/');
17+
}
18+
19+
getParagraphText() {
20+
return element(by.css('app-root h1')).getText();
21+
}
22+
}

0 commit comments

Comments
 (0)