Skip to content

Commit 6fb9397

Browse files
committed
add demo app
1 parent b43461c commit 6fb9397

21 files changed

+872
-0
lines changed

angular.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,104 @@
3333
}
3434
}
3535
}
36+
},
37+
"demo": {
38+
"projectType": "application",
39+
"schematics": {
40+
"@schematics/angular:application": {
41+
"strict": true
42+
}
43+
},
44+
"root": "projects/demo",
45+
"sourceRoot": "projects/demo/src",
46+
"prefix": "app",
47+
"architect": {
48+
"build": {
49+
"builder": "@angular-devkit/build-angular:browser",
50+
"options": {
51+
"outputPath": "dist/demo",
52+
"index": "projects/demo/src/index.html",
53+
"main": "projects/demo/src/main.ts",
54+
"polyfills": "projects/demo/src/polyfills.ts",
55+
"tsConfig": "projects/demo/tsconfig.app.json",
56+
"assets": [
57+
"projects/demo/src/favicon.ico",
58+
"projects/demo/src/assets"
59+
],
60+
"styles": [
61+
"projects/demo/src/styles.css"
62+
],
63+
"scripts": []
64+
},
65+
"configurations": {
66+
"production": {
67+
"budgets": [
68+
{
69+
"type": "initial",
70+
"maximumWarning": "500kb",
71+
"maximumError": "1mb"
72+
},
73+
{
74+
"type": "anyComponentStyle",
75+
"maximumWarning": "2kb",
76+
"maximumError": "4kb"
77+
}
78+
],
79+
"fileReplacements": [
80+
{
81+
"replace": "projects/demo/src/environments/environment.ts",
82+
"with": "projects/demo/src/environments/environment.prod.ts"
83+
}
84+
],
85+
"outputHashing": "all"
86+
},
87+
"development": {
88+
"buildOptimizer": false,
89+
"optimization": false,
90+
"vendorChunk": true,
91+
"extractLicenses": false,
92+
"sourceMap": true,
93+
"namedChunks": true
94+
}
95+
},
96+
"defaultConfiguration": "production"
97+
},
98+
"serve": {
99+
"builder": "@angular-devkit/build-angular:dev-server",
100+
"configurations": {
101+
"production": {
102+
"browserTarget": "demo:build:production"
103+
},
104+
"development": {
105+
"browserTarget": "demo:build:development"
106+
}
107+
},
108+
"defaultConfiguration": "development"
109+
},
110+
"extract-i18n": {
111+
"builder": "@angular-devkit/build-angular:extract-i18n",
112+
"options": {
113+
"browserTarget": "demo:build"
114+
}
115+
},
116+
"test": {
117+
"builder": "@angular-devkit/build-angular:karma",
118+
"options": {
119+
"main": "projects/demo/src/test.ts",
120+
"polyfills": "projects/demo/src/polyfills.ts",
121+
"tsConfig": "projects/demo/tsconfig.spec.json",
122+
"karmaConfig": "projects/demo/karma.conf.js",
123+
"assets": [
124+
"projects/demo/src/favicon.ico",
125+
"projects/demo/src/assets"
126+
],
127+
"styles": [
128+
"projects/demo/src/styles.css"
129+
],
130+
"scripts": []
131+
}
132+
}
133+
}
36134
}
37135
},
38136
"defaultProject": "ngx-infinite-scroll"

projects/demo/.browserslistrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR

projects/demo/karma.conf.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../coverage/demo'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};

projects/demo/src/app/app.component.css

Whitespace-only changes.

0 commit comments

Comments
 (0)