projeto-lib 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +16 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +27 -0
- package/angular.json +128 -0
- package/package.json +39 -0
- package/projects/lib-component/README.md +24 -0
- package/projects/lib-component/ng-package.json +7 -0
- package/projects/lib-component/package.json +12 -0
- package/projects/lib-component/src/lib/components/chip/chip.component.css +34 -0
- package/projects/lib-component/src/lib/components/chip/chip.component.html +1 -0
- package/projects/lib-component/src/lib/components/chip/chip.component.spec.ts +23 -0
- package/projects/lib-component/src/lib/components/chip/chip.component.ts +13 -0
- package/projects/lib-component/src/lib/lib-component.component.spec.ts +23 -0
- package/projects/lib-component/src/lib/lib-component.component.ts +16 -0
- package/projects/lib-component/src/lib/lib-component.service.spec.ts +16 -0
- package/projects/lib-component/src/lib/lib-component.service.ts +9 -0
- package/projects/lib-component/src/public-api.ts +6 -0
- package/projects/lib-component/tsconfig.lib.json +14 -0
- package/projects/lib-component/tsconfig.lib.prod.json +10 -0
- package/projects/lib-component/tsconfig.spec.json +14 -0
- package/src/app/app.component.css +0 -0
- package/src/app/app.component.html +1 -0
- package/src/app/app.component.spec.ts +29 -0
- package/src/app/app.component.ts +14 -0
- package/src/app/app.config.ts +8 -0
- package/src/app/app.routes.ts +3 -0
- package/src/assets/.gitkeep +0 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +13 -0
- package/src/main.ts +6 -0
- package/src/styles.css +1 -0
- package/tsconfig.app.json +14 -0
- package/tsconfig.json +37 -0
- package/tsconfig.spec.json +14 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ProjetoLib
|
|
2
|
+
|
|
3
|
+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.9.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application 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.
|
|
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 a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
|
24
|
+
|
|
25
|
+
## Further help
|
|
26
|
+
|
|
27
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
package/angular.json
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"projeto-lib": {
|
|
7
|
+
"projectType": "application",
|
|
8
|
+
"schematics": {},
|
|
9
|
+
"root": "",
|
|
10
|
+
"sourceRoot": "src",
|
|
11
|
+
"prefix": "app",
|
|
12
|
+
"architect": {
|
|
13
|
+
"build": {
|
|
14
|
+
"builder": "@angular-devkit/build-angular:application",
|
|
15
|
+
"options": {
|
|
16
|
+
"outputPath": "dist/projeto-lib",
|
|
17
|
+
"index": "src/index.html",
|
|
18
|
+
"browser": "src/main.ts",
|
|
19
|
+
"polyfills": [
|
|
20
|
+
"zone.js"
|
|
21
|
+
],
|
|
22
|
+
"tsConfig": "tsconfig.app.json",
|
|
23
|
+
"assets": [
|
|
24
|
+
"src/favicon.ico",
|
|
25
|
+
"src/assets"
|
|
26
|
+
],
|
|
27
|
+
"styles": [
|
|
28
|
+
"src/styles.css"
|
|
29
|
+
],
|
|
30
|
+
"scripts": []
|
|
31
|
+
},
|
|
32
|
+
"configurations": {
|
|
33
|
+
"production": {
|
|
34
|
+
"budgets": [
|
|
35
|
+
{
|
|
36
|
+
"type": "initial",
|
|
37
|
+
"maximumWarning": "500kb",
|
|
38
|
+
"maximumError": "1mb"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "anyComponentStyle",
|
|
42
|
+
"maximumWarning": "2kb",
|
|
43
|
+
"maximumError": "4kb"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"outputHashing": "all"
|
|
47
|
+
},
|
|
48
|
+
"development": {
|
|
49
|
+
"optimization": false,
|
|
50
|
+
"extractLicenses": false,
|
|
51
|
+
"sourceMap": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"defaultConfiguration": "production"
|
|
55
|
+
},
|
|
56
|
+
"serve": {
|
|
57
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
58
|
+
"configurations": {
|
|
59
|
+
"production": {
|
|
60
|
+
"buildTarget": "projeto-lib:build:production"
|
|
61
|
+
},
|
|
62
|
+
"development": {
|
|
63
|
+
"buildTarget": "projeto-lib:build:development"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"defaultConfiguration": "development"
|
|
67
|
+
},
|
|
68
|
+
"extract-i18n": {
|
|
69
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
70
|
+
"options": {
|
|
71
|
+
"buildTarget": "projeto-lib:build"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"test": {
|
|
75
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
76
|
+
"options": {
|
|
77
|
+
"polyfills": [
|
|
78
|
+
"zone.js",
|
|
79
|
+
"zone.js/testing"
|
|
80
|
+
],
|
|
81
|
+
"tsConfig": "tsconfig.spec.json",
|
|
82
|
+
"assets": [
|
|
83
|
+
"src/favicon.ico",
|
|
84
|
+
"src/assets"
|
|
85
|
+
],
|
|
86
|
+
"styles": [
|
|
87
|
+
"src/styles.css"
|
|
88
|
+
],
|
|
89
|
+
"scripts": []
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"lib-component": {
|
|
95
|
+
"projectType": "library",
|
|
96
|
+
"root": "projects/lib-component",
|
|
97
|
+
"sourceRoot": "projects/lib-component/src",
|
|
98
|
+
"prefix": "lib",
|
|
99
|
+
"architect": {
|
|
100
|
+
"build": {
|
|
101
|
+
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
102
|
+
"options": {
|
|
103
|
+
"project": "projects/lib-component/ng-package.json"
|
|
104
|
+
},
|
|
105
|
+
"configurations": {
|
|
106
|
+
"production": {
|
|
107
|
+
"tsConfig": "projects/lib-component/tsconfig.lib.prod.json"
|
|
108
|
+
},
|
|
109
|
+
"development": {
|
|
110
|
+
"tsConfig": "projects/lib-component/tsconfig.lib.json"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"defaultConfiguration": "production"
|
|
114
|
+
},
|
|
115
|
+
"test": {
|
|
116
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
117
|
+
"options": {
|
|
118
|
+
"tsConfig": "projects/lib-component/tsconfig.spec.json",
|
|
119
|
+
"polyfills": [
|
|
120
|
+
"zone.js",
|
|
121
|
+
"zone.js/testing"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "projeto-lib",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"start": "ng serve",
|
|
7
|
+
"build": "ng build",
|
|
8
|
+
"watch": "ng build --watch --configuration development",
|
|
9
|
+
"test": "ng test"
|
|
10
|
+
},
|
|
11
|
+
"private": false,
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@angular/animations": "^17.3.0",
|
|
14
|
+
"@angular/common": "^17.3.0",
|
|
15
|
+
"@angular/compiler": "^17.3.0",
|
|
16
|
+
"@angular/core": "^17.3.0",
|
|
17
|
+
"@angular/forms": "^17.3.0",
|
|
18
|
+
"@angular/platform-browser": "^17.3.0",
|
|
19
|
+
"@angular/platform-browser-dynamic": "^17.3.0",
|
|
20
|
+
"@angular/router": "^17.3.0",
|
|
21
|
+
"rxjs": "~7.8.0",
|
|
22
|
+
"tslib": "^2.3.0",
|
|
23
|
+
"zone.js": "~0.14.3"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@angular-devkit/build-angular": "^17.3.9",
|
|
27
|
+
"@angular/cli": "^17.3.9",
|
|
28
|
+
"@angular/compiler-cli": "^17.3.0",
|
|
29
|
+
"@types/jasmine": "~5.1.0",
|
|
30
|
+
"jasmine-core": "~5.1.0",
|
|
31
|
+
"karma": "~6.4.0",
|
|
32
|
+
"karma-chrome-launcher": "~3.2.0",
|
|
33
|
+
"karma-coverage": "~2.2.0",
|
|
34
|
+
"karma-jasmine": "~5.1.0",
|
|
35
|
+
"karma-jasmine-html-reporter": "~2.1.0",
|
|
36
|
+
"ng-packagr": "^17.3.0",
|
|
37
|
+
"typescript": "~5.4.2"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# LibComponent
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project lib-component` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project lib-component`.
|
|
8
|
+
> Note: Don't forget to add `--project lib-component` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build lib-component` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build lib-component`, go to the dist folder `cd dist/lib-component` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test lib-component` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.chip {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
padding: 0.25rem 0.75rem;
|
|
4
|
+
font-size: 0.875rem;
|
|
5
|
+
font-weight: 500;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
color: #fff;
|
|
8
|
+
background-color: #007bff;
|
|
9
|
+
border-radius: 16px;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.info {
|
|
14
|
+
background-color: #e0f7fa !important;
|
|
15
|
+
color: #006064 !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.success {
|
|
19
|
+
background-color: #e8f5e9 !important;
|
|
20
|
+
color: #1b5e20 !important;
|
|
21
|
+
border: 1px solid #2e7d32;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.warning {
|
|
25
|
+
background-color: #fff3e0 !important;
|
|
26
|
+
color: #e65100 !important;
|
|
27
|
+
border: 1px solid #ef6c00;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.error {
|
|
31
|
+
background-color: #ffebee !important;
|
|
32
|
+
color: #b71c1c !important;
|
|
33
|
+
border: 1px solid #c62828;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<label class="chip {{ type() }}">{{ label() }}</label>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ChipComponent } from './chip.component';
|
|
4
|
+
|
|
5
|
+
describe('ChipComponent', () => {
|
|
6
|
+
let component: ChipComponent;
|
|
7
|
+
let fixture: ComponentFixture<ChipComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ChipComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ChipComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-chip',
|
|
5
|
+
standalone: true,
|
|
6
|
+
imports: [],
|
|
7
|
+
templateUrl: './chip.component.html',
|
|
8
|
+
styleUrl: './chip.component.css',
|
|
9
|
+
})
|
|
10
|
+
export class ChipComponent {
|
|
11
|
+
label = input<string>('');
|
|
12
|
+
type = input<string>('');
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { LibComponentComponent } from './lib-component.component';
|
|
4
|
+
|
|
5
|
+
describe('LibComponentComponent', () => {
|
|
6
|
+
let component: LibComponentComponent;
|
|
7
|
+
let fixture: ComponentFixture<LibComponentComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [LibComponentComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(LibComponentComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-lib-component',
|
|
5
|
+
standalone: true,
|
|
6
|
+
imports: [],
|
|
7
|
+
template: `
|
|
8
|
+
<p>
|
|
9
|
+
lib-component works!
|
|
10
|
+
</p>
|
|
11
|
+
`,
|
|
12
|
+
styles: ``
|
|
13
|
+
})
|
|
14
|
+
export class LibComponentComponent {
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { LibComponentService } from './lib-component.service';
|
|
4
|
+
|
|
5
|
+
describe('LibComponentService', () => {
|
|
6
|
+
let service: LibComponentService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(LibComponentService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/lib",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"inlineSources": true,
|
|
9
|
+
"types": []
|
|
10
|
+
},
|
|
11
|
+
"exclude": [
|
|
12
|
+
"**/*.spec.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"**/*.spec.ts",
|
|
12
|
+
"**/*.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<lib-chip label="Chip" type="info"></lib-chip>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { AppComponent } from './app.component';
|
|
3
|
+
|
|
4
|
+
describe('AppComponent', () => {
|
|
5
|
+
beforeEach(async () => {
|
|
6
|
+
await TestBed.configureTestingModule({
|
|
7
|
+
imports: [AppComponent],
|
|
8
|
+
}).compileComponents();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should create the app', () => {
|
|
12
|
+
const fixture = TestBed.createComponent(AppComponent);
|
|
13
|
+
const app = fixture.componentInstance;
|
|
14
|
+
expect(app).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it(`should have the 'projeto-lib' title`, () => {
|
|
18
|
+
const fixture = TestBed.createComponent(AppComponent);
|
|
19
|
+
const app = fixture.componentInstance;
|
|
20
|
+
expect(app.title).toEqual('projeto-lib');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('should render title', () => {
|
|
24
|
+
const fixture = TestBed.createComponent(AppComponent);
|
|
25
|
+
fixture.detectChanges();
|
|
26
|
+
const compiled = fixture.nativeElement as HTMLElement;
|
|
27
|
+
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, projeto-lib');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { RouterOutlet } from '@angular/router';
|
|
3
|
+
import { ChipComponent } from '../../projects/lib-component/src/lib/components/chip/chip.component';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-root',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [ChipComponent],
|
|
9
|
+
templateUrl: './app.component.html',
|
|
10
|
+
styleUrl: './app.component.css',
|
|
11
|
+
})
|
|
12
|
+
export class AppComponent {
|
|
13
|
+
title = 'projeto-lib';
|
|
14
|
+
}
|
|
File without changes
|
package/src/favicon.ico
ADDED
|
Binary file
|
package/src/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>ProjetoLib</title>
|
|
6
|
+
<base href="/">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<app-root></app-root>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/src/main.ts
ADDED
package/src/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./out-tsc/app",
|
|
6
|
+
"types": []
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"src/main.ts"
|
|
10
|
+
],
|
|
11
|
+
"include": [
|
|
12
|
+
"src/**/*.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"compileOnSave": false,
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./dist/out-tsc",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noImplicitOverride": true,
|
|
8
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"paths": {
|
|
11
|
+
"lib-component": [
|
|
12
|
+
"./dist/lib-component"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
"sourceMap": true,
|
|
19
|
+
"declaration": false,
|
|
20
|
+
"experimentalDecorators": true,
|
|
21
|
+
"moduleResolution": "node",
|
|
22
|
+
"importHelpers": true,
|
|
23
|
+
"target": "ES2022",
|
|
24
|
+
"module": "ES2022",
|
|
25
|
+
"useDefineForClassFields": false,
|
|
26
|
+
"lib": [
|
|
27
|
+
"ES2022",
|
|
28
|
+
"dom"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"angularCompilerOptions": {
|
|
32
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
33
|
+
"strictInjectionParameters": true,
|
|
34
|
+
"strictInputAccessModifiers": true,
|
|
35
|
+
"strictTemplates": true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"src/**/*.spec.ts",
|
|
12
|
+
"src/**/*.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|