Skip to content

Commit f4a94e3

Browse files
committed
so i recreated the project
1 parent d502de3 commit f4a94e3

Some content is hidden

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

71 files changed

+2684
-9058
lines changed

.eslintrc.json

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

.prettierrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
"bracketSpacing": true,
66
"printWidth": 100,
77
"arrowParens": "avoid",
8-
"endOfLine": "crlf"
8+
"endOfLine": "crlf",
9+
"overrides": [
10+
{
11+
"files": "*.html",
12+
"options": {
13+
"parser": "angular"
14+
}
15+
}
16+
]
917
}

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": "always"
6+
},
7+
}

.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

angular.json

Lines changed: 61 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
4+
"cli": {
5+
"packageManager": "npm"
6+
},
47
"newProjectRoot": "projects",
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"testRunner": "karma"
11+
},
12+
"@schematics/angular:library": {
13+
"testRunner": "karma"
14+
}
15+
},
516
"projects": {
6-
"ngx-toastr": {
17+
"ngx-toastr-site": {
718
"projectType": "application",
819
"schematics": {
920
"@schematics/angular:component": {
1021
"style": "scss"
11-
},
12-
"@schematics/angular:application": {
13-
"strict": true
1422
}
1523
},
1624
"root": "",
@@ -20,16 +28,31 @@
2028
"build": {
2129
"builder": "@angular/build:application",
2230
"options": {
23-
"outputPath": "dist",
24-
"index": "src/index.html",
2531
"browser": "src/main.ts",
2632
"tsConfig": "tsconfig.app.json",
27-
"assets": ["src/favicon.ico", "src/assets"],
28-
"styles": ["src/styles.scss"],
29-
"polyfills": ["zone.js"]
33+
"inlineStyleLanguage": "scss",
34+
"assets": [
35+
{
36+
"glob": "**/*",
37+
"input": "public"
38+
}
39+
],
40+
"styles": ["src/styles.scss"]
3041
},
3142
"configurations": {
3243
"production": {
44+
"budgets": [
45+
{
46+
"type": "initial",
47+
"maximumWarning": "500kB",
48+
"maximumError": "1MB"
49+
},
50+
{
51+
"type": "anyComponentStyle",
52+
"maximumWarning": "4kB",
53+
"maximumError": "8kB"
54+
}
55+
],
3356
"outputHashing": "all"
3457
},
3558
"development": {
@@ -42,29 +65,22 @@
4265
},
4366
"serve": {
4467
"builder": "@angular/build:dev-server",
45-
"options": {
46-
"buildTarget": "ngx-toastr:build"
47-
},
4868
"configurations": {
4969
"production": {
50-
"buildTarget": "ngx-toastr:build:production"
70+
"buildTarget": "ngx-toastr-site:build:production"
71+
},
72+
"development": {
73+
"buildTarget": "ngx-toastr-site:build:development"
5174
}
52-
}
53-
},
54-
"extract-i18n": {
55-
"builder": "@angular/build:extract-i18n",
56-
"options": {
57-
"buildTarget": "ngx-toastr:build"
58-
}
75+
},
76+
"defaultConfiguration": "development"
5977
},
6078
"test": {
6179
"builder": "@angular/build:unit-test",
6280
"options": {
63-
"tsConfig": "tsconfig.spec.json",
6481
"runner": "karma",
65-
"coverage": true,
66-
"ui": false,
67-
"runnerConfig": true
82+
"runnerConfig": true,
83+
"coverage": true
6884
}
6985
},
7086
"lint": {
@@ -74,9 +90,27 @@
7490
}
7591
}
7692
}
93+
},
94+
"ngx-toastr": {
95+
"projectType": "library",
96+
"root": "projects/ngx-toastr",
97+
"sourceRoot": "projects/ngx-toastr/src",
98+
"prefix": "lib",
99+
"architect": {
100+
"build": {
101+
"builder": "@angular/build:ng-packagr",
102+
"configurations": {
103+
"production": {
104+
"tsConfig": "projects/ngx-toastr/tsconfig.lib.prod.json"
105+
},
106+
"development": {
107+
"tsConfig": "projects/ngx-toastr/tsconfig.lib.json"
108+
}
109+
},
110+
"defaultConfiguration": "production"
111+
}
112+
}
77113
}
78-
},
79-
"cli": {
80-
"analytics": false
81114
}
82115
}
116+

eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// @ts-check
2+
const eslint = require('@eslint/js');
3+
const { defineConfig } = require('eslint/config');
4+
const tseslint = require('typescript-eslint');
5+
const angular = require('angular-eslint');
6+
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
7+
8+
module.exports = defineConfig([
9+
{
10+
files: ['**/*.ts'],
11+
extends: [
12+
eslint.configs.recommended,
13+
tseslint.configs.recommended,
14+
tseslint.configs.stylistic,
15+
angular.configs.tsRecommended,
16+
],
17+
processor: angular.processInlineTemplates,
18+
rules: {
19+
'@angular-eslint/component-class-suffix': 'off',
20+
},
21+
},
22+
{
23+
files: ['**/*.html'],
24+
extends: [angular.configs.templateRecommended],
25+
rules: {},
26+
},
27+
eslintPluginPrettierRecommended,
28+
]);

karma.conf.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4+
/**
5+
* @param {import('karma').Config} config
6+
*/
47
module.exports = function (config) {
58
config.set({
69
basePath: '',
@@ -10,7 +13,6 @@ module.exports = function (config) {
1013
require('karma-chrome-launcher'),
1114
require('karma-jasmine-html-reporter'),
1215
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma'),
1416
],
1517
client: {
1618
clearContext: false, // leave Jasmine Spec Runner output visible in browser
@@ -32,7 +34,6 @@ module.exports = function (config) {
3234
flags: ['--no-sandbox', '--disable-gpu'],
3335
},
3436
},
35-
singleRun: false,
3637
restartOnFileChange: true,
3738
});
3839
};

0 commit comments

Comments
 (0)