Skip to content

Commit c7bdac6

Browse files
committed
Creating the demo application.
0 parents  commit c7bdac6

File tree

92 files changed

+14152
-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.

92 files changed

+14152
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Demo
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.1.5.
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

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

e2e/protractor.conf.js

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

e2e/src/app.e2e-spec.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('workspace-project App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to demo!');
13+
});
14+
});

e2e/src/app.po.ts

+11
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('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.e2e.json

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

0 commit comments

Comments
 (0)