Skip to content

Commit e98080c

Browse files
committed
Create project
Setting up-project and linting
0 parents  commit e98080c

31 files changed

Lines changed: 7835 additions & 0 deletions

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://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+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# DocumentaionWebsite
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.0.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

angular.json

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"documentation-website": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"spec": false,
11+
"skipImport": true,
12+
"style": "sass"
13+
},
14+
"@schematics/angular:class": {
15+
"spec": false,
16+
"skipImport": true
17+
},
18+
"@schematics/angular:directive": {
19+
"spec": false,
20+
"skipImport": true
21+
},
22+
"@schematics/angular:guard": {
23+
"spec": false,
24+
"skipImport": true
25+
},
26+
"@schematics/angular:module": {
27+
"spec": false,
28+
"skipImport": true
29+
},
30+
"@schematics/angular:pipe": {
31+
"spec": false,
32+
"skipImport": true
33+
},
34+
"@schematics/angular:service": {
35+
"spec": false,
36+
"skipImport": true
37+
}
38+
},
39+
"root": "",
40+
"sourceRoot": "src",
41+
"prefix": "app",
42+
"architect": {
43+
"build": {
44+
"builder": "@angular-devkit/build-angular:browser",
45+
"options": {
46+
"outputPath": "dist/documentation-website",
47+
"index": "src/index.html",
48+
"main": "src/main.ts",
49+
"polyfills": "src/polyfills.ts",
50+
"tsConfig": "tsconfig.app.json",
51+
"aot": false,
52+
"assets": [
53+
"src/favicon.ico",
54+
"src/assets"
55+
],
56+
"styles": [
57+
"src/styles/styles.scss"
58+
],
59+
"scripts": []
60+
},
61+
"configurations": {
62+
"production": {
63+
"fileReplacements": [
64+
{
65+
"replace": "src/environments/environment.ts",
66+
"with": "src/environments/environment.prod.ts"
67+
}
68+
],
69+
"optimization": true,
70+
"outputHashing": "all",
71+
"sourceMap": false,
72+
"extractCss": true,
73+
"namedChunks": false,
74+
"aot": true,
75+
"extractLicenses": true,
76+
"vendorChunk": false,
77+
"buildOptimizer": true,
78+
"budgets": [
79+
{
80+
"type": "initial",
81+
"maximumWarning": "2mb",
82+
"maximumError": "5mb"
83+
},
84+
{
85+
"type": "anyComponentStyle",
86+
"maximumWarning": "6kb",
87+
"maximumError": "10kb"
88+
}
89+
]
90+
}
91+
}
92+
},
93+
"serve": {
94+
"builder": "@angular-devkit/build-angular:dev-server",
95+
"options": {
96+
"browserTarget": "documentation-website:build"
97+
},
98+
"configurations": {
99+
"production": {
100+
"browserTarget": "documentation-website:build:production"
101+
}
102+
}
103+
},
104+
"extract-i18n": {
105+
"builder": "@angular-devkit/build-angular:extract-i18n",
106+
"options": {
107+
"browserTarget": "documentation-website:build"
108+
}
109+
},
110+
"test": {
111+
"builder": "@angular-devkit/build-angular:karma",
112+
"options": {
113+
"main": "src/test.ts",
114+
"polyfills": "src/polyfills.ts",
115+
"tsConfig": "tsconfig.spec.json",
116+
"karmaConfig": "karma.conf.js",
117+
"assets": [
118+
"src/favicon.ico",
119+
"src/assets"
120+
],
121+
"styles": [
122+
"src/styles/styles.scss"
123+
],
124+
"scripts": []
125+
}
126+
},
127+
"lint": {
128+
"builder": "@angular-devkit/build-angular:tslint",
129+
"options": {
130+
"tsConfig": [
131+
"tsconfig.app.json",
132+
"tsconfig.spec.json",
133+
"e2e/tsconfig.json"
134+
],
135+
"exclude": [
136+
"**/node_modules/**"
137+
]
138+
}
139+
},
140+
"e2e": {
141+
"builder": "@angular-devkit/build-angular:protractor",
142+
"options": {
143+
"protractorConfig": "e2e/protractor.conf.js",
144+
"devServerTarget": "documentation-website:serve"
145+
},
146+
"configurations": {
147+
"production": {
148+
"devServerTarget": "documentation-website:serve:production"
149+
}
150+
}
151+
}
152+
}
153+
}
154+
},
155+
"defaultProject": "documentation-website"
156+
}

browserslist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

e2e/protractor.conf.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-check
2+
// Protractor configuration file, see link for more information
3+
// https://github.com/angular/protractor/blob/master/lib/config.ts
4+
5+
const { SpecReporter } = require('jasmine-spec-reporter');
6+
7+
/**
8+
* @type { import("protractor").Config }
9+
*/
10+
exports.config = {
11+
allScriptsTimeout: 11000,
12+
specs: [
13+
'./src/**/*.e2e-spec.ts'
14+
],
15+
capabilities: {
16+
'browserName': 'chrome'
17+
},
18+
directConnect: true,
19+
baseUrl: 'http://localhost:4200/',
20+
framework: 'jasmine',
21+
jasmineNodeOpts: {
22+
showColors: true,
23+
defaultTimeoutInterval: 30000,
24+
print: function() {}
25+
},
26+
onPrepare() {
27+
require('ts-node').register({
28+
project: require('path').join(__dirname, './tsconfig.json')
29+
});
30+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31+
}
32+
};

e2e/src/app.e2e-spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { AppPage } from './app.po';
2+
import { browser, logging } from 'protractor';
3+
4+
describe('workspace-project App', () => {
5+
let page: AppPage;
6+
7+
beforeEach(() => {
8+
page = new AppPage();
9+
});
10+
11+
it('should display welcome message', () => {
12+
page.navigateTo();
13+
expect(page.getTitleText()).toEqual('Welcome to documentation-website!');
14+
});
15+
16+
afterEach(async () => {
17+
// Assert that there are no errors emitted from the browser
18+
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19+
expect(logs).not.toContain(jasmine.objectContaining({
20+
level: logging.Level.SEVERE,
21+
} as logging.Entry));
22+
});
23+
});

e2e/src/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get(browser.baseUrl) as Promise<any>;
6+
}
7+
8+
getTitleText() {
9+
return element(by.css('app-root h1')).getText() as Promise<string>;
10+
}
11+
}

e2e/tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}

karma.conf.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, './coverage/documentation-website'),
20+
reports: ['html', 'lcovonly', 'text-summary'],
21+
fixWebpackSourcePaths: true
22+
},
23+
reporters: ['progress', 'kjhtml'],
24+
port: 9876,
25+
colors: true,
26+
logLevel: config.LOG_INFO,
27+
autoWatch: true,
28+
browsers: ['Chrome'],
29+
singleRun: false,
30+
restartOnFileChange: true
31+
});
32+
};

0 commit comments

Comments
 (0)