Skip to content

Commit 20d3301

Browse files
author
Danil Moroz
committed
Updated structure
1 parent c1f46a9 commit 20d3301

File tree

109 files changed

+10024
-2340
lines changed

Some content is hidden

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

109 files changed

+10024
-2340
lines changed

.babelrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
node_modules
33
/lib
44
build
5-
dist
65
/develop
76

87
### Files

.npmignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
### Directories
22
src
33
demo
4-
dist
54
/develop
65

76
### Files
87
.babelrc
9-
webpack.config.js
108
tsconfig.json
119
tslint.json

README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

angular.json

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"client": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"style": "sass"
14+
}
15+
},
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist/client",
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+
"./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css",
31+
"src/styles.sass"
32+
],
33+
"scripts": [],
34+
"es5BrowserSupport": true
35+
},
36+
"configurations": {
37+
"production": {
38+
"fileReplacements": [
39+
{
40+
"replace": "src/environments/environment.ts",
41+
"with": "src/environments/environment.prod.ts"
42+
}
43+
],
44+
"optimization": true,
45+
"outputHashing": "all",
46+
"sourceMap": false,
47+
"extractCss": true,
48+
"namedChunks": false,
49+
"aot": true,
50+
"extractLicenses": true,
51+
"vendorChunk": false,
52+
"buildOptimizer": true,
53+
"budgets": [
54+
{
55+
"type": "initial",
56+
"maximumWarning": "4mb",
57+
"maximumError": "5mb"
58+
}
59+
]
60+
}
61+
}
62+
},
63+
"serve": {
64+
"builder": "@angular-devkit/build-angular:dev-server",
65+
"options": {
66+
"browserTarget": "client:build"
67+
},
68+
"configurations": {
69+
"production": {
70+
"browserTarget": "client:build:production"
71+
}
72+
}
73+
},
74+
"extract-i18n": {
75+
"builder": "@angular-devkit/build-angular:extract-i18n",
76+
"options": {
77+
"browserTarget": "client: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+
"./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css",
89+
"src/styles.sass"
90+
],
91+
"scripts": [],
92+
"assets": [
93+
"src/favicon.ico",
94+
"src/assets"
95+
]
96+
}
97+
},
98+
"lint": {
99+
"builder": "@angular-devkit/build-angular:tslint",
100+
"options": {
101+
"tsConfig": [
102+
"src/tsconfig.app.json",
103+
"src/tsconfig.spec.json"
104+
],
105+
"exclude": [
106+
"**/node_modules/**"
107+
]
108+
}
109+
}
110+
}
111+
},
112+
"client-e2e": {
113+
"root": "e2e/",
114+
"projectType": "application",
115+
"prefix": "",
116+
"architect": {
117+
"e2e": {
118+
"builder": "@angular-devkit/build-angular:protractor",
119+
"options": {
120+
"protractorConfig": "e2e/protractor.conf.js",
121+
"devServerTarget": "client:serve"
122+
},
123+
"configurations": {
124+
"production": {
125+
"devServerTarget": "client:serve:production"
126+
}
127+
}
128+
},
129+
"lint": {
130+
"builder": "@angular-devkit/build-angular:tslint",
131+
"options": {
132+
"tsConfig": "e2e/tsconfig.e2e.json",
133+
"exclude": [
134+
"**/node_modules/**"
135+
]
136+
}
137+
}
138+
}
139+
},
140+
"angular-breadcrumbs-light": {
141+
"root": "projects/angular-breadcrumbs-light",
142+
"sourceRoot": "projects/angular-breadcrumbs-light/src",
143+
"projectType": "library",
144+
"prefix": "lib",
145+
"architect": {
146+
"build": {
147+
"builder": "@angular-devkit/build-ng-packagr:build",
148+
"options": {
149+
"tsConfig": "projects/angular-breadcrumbs-light/tsconfig.lib.json",
150+
"project": "projects/angular-breadcrumbs-light/ng-package.json"
151+
}
152+
},
153+
"test": {
154+
"builder": "@angular-devkit/build-angular:karma",
155+
"options": {
156+
"main": "projects/angular-breadcrumbs-light/src/test.ts",
157+
"tsConfig": "projects/angular-breadcrumbs-light/tsconfig.spec.json",
158+
"karmaConfig": "projects/angular-breadcrumbs-light/karma.conf.js"
159+
}
160+
},
161+
"lint": {
162+
"builder": "@angular-devkit/build-angular:tslint",
163+
"options": {
164+
"tsConfig": [
165+
"projects/angular-breadcrumbs-light/tsconfig.lib.json",
166+
"projects/angular-breadcrumbs-light/tsconfig.spec.json"
167+
],
168+
"exclude": [
169+
"**/node_modules/**"
170+
]
171+
}
172+
}
173+
}
174+
}
175+
},
176+
"defaultProject": "client"
177+
}

e2e/protractor.conf.js

Lines changed: 28 additions & 0 deletions
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

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 client!');
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.e2e.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/app",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}

0 commit comments

Comments
 (0)