ngx-ratio-image 0.0.2 → 0.0.7

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.
Files changed (67) hide show
  1. package/.editorconfig +16 -0
  2. package/.eslintrc.json +38 -0
  3. package/.github/workflows/node.js.yml +40 -0
  4. package/.github/workflows/npm-publish.yml +42 -0
  5. package/.prettierignore +3 -0
  6. package/.run/lint.run.xml +12 -0
  7. package/.run/test.run.xml +12 -0
  8. package/.vscode/extensions.json +4 -0
  9. package/.vscode/launch.json +20 -0
  10. package/.vscode/tasks.json +42 -0
  11. package/LICENSE +21 -0
  12. package/README.md +14 -92
  13. package/angular.json +144 -0
  14. package/ng-package.json +8 -0
  15. package/package.json +76 -26
  16. package/prettier.config.js +16 -0
  17. package/projects/ngx-ratio-image/.eslintrc.json +31 -0
  18. package/projects/ngx-ratio-image/README.md +104 -0
  19. package/projects/ngx-ratio-image/ng-package.json +7 -0
  20. package/projects/ngx-ratio-image/package.json +25 -0
  21. package/projects/ngx-ratio-image/src/lib/ratio-image/ratio-image.component.html +42 -0
  22. package/projects/ngx-ratio-image/src/lib/ratio-image/ratio-image.component.spec.ts +21 -0
  23. package/projects/ngx-ratio-image/src/lib/ratio-image/ratio-image.component.ts +75 -0
  24. package/projects/ngx-ratio-image/src/lib/ratio-image.module.ts +10 -0
  25. package/{public-api.d.ts → projects/ngx-ratio-image/src/public-api.ts} +4 -0
  26. package/projects/ngx-ratio-image/tsconfig.lib.json +12 -0
  27. package/projects/ngx-ratio-image/tsconfig.lib.prod.json +10 -0
  28. package/projects/ngx-ratio-image/tsconfig.spec.json +9 -0
  29. package/projects/ratio-image-app/.eslintrc.json +31 -0
  30. package/projects/ratio-image-app/src/app/app-routing.module.ts +26 -0
  31. package/projects/ratio-image-app/src/app/app.component.html +6 -0
  32. package/projects/ratio-image-app/src/app/app.component.scss +9 -0
  33. package/projects/ratio-image-app/src/app/app.component.spec.ts +31 -0
  34. package/projects/ratio-image-app/src/app/app.component.ts +11 -0
  35. package/projects/ratio-image-app/src/app/app.module.ts +27 -0
  36. package/projects/ratio-image-app/src/app/home/home-routing.module.ts +17 -0
  37. package/projects/ratio-image-app/src/app/home/home.component.html +24 -0
  38. package/projects/ratio-image-app/src/app/home/home.component.scss +0 -0
  39. package/projects/ratio-image-app/src/app/home/home.component.spec.ts +24 -0
  40. package/projects/ratio-image-app/src/app/home/home.component.ts +12 -0
  41. package/projects/ratio-image-app/src/app/home/home.module.ts +12 -0
  42. package/projects/ratio-image-app/src/app/interactive/interactive-routing.module.ts +17 -0
  43. package/projects/ratio-image-app/src/app/interactive/interactive.component.html +40 -0
  44. package/projects/ratio-image-app/src/app/interactive/interactive.component.scss +0 -0
  45. package/projects/ratio-image-app/src/app/interactive/interactive.component.spec.ts +43 -0
  46. package/projects/ratio-image-app/src/app/interactive/interactive.component.ts +32 -0
  47. package/projects/ratio-image-app/src/app/interactive/interactive.module.ts +31 -0
  48. package/projects/ratio-image-app/src/assets/.gitkeep +0 -0
  49. package/projects/ratio-image-app/src/assets/1to1.jpg +0 -0
  50. package/projects/ratio-image-app/src/assets/3to4.jpg +0 -0
  51. package/projects/ratio-image-app/src/assets/4to3.jpg +0 -0
  52. package/projects/ratio-image-app/src/favicon.ico +0 -0
  53. package/projects/ratio-image-app/src/index.html +16 -0
  54. package/projects/ratio-image-app/src/main.ts +7 -0
  55. package/projects/ratio-image-app/src/styles.scss +13 -0
  56. package/projects/ratio-image-app/tsconfig.app.json +10 -0
  57. package/projects/ratio-image-app/tsconfig.spec.json +9 -0
  58. package/tsconfig.json +33 -0
  59. package/esm2022/lib/ratio-image/ratio-image.component.mjs +0 -68
  60. package/esm2022/lib/ratio-image.module.mjs +0 -17
  61. package/esm2022/ngx-ratio-image.mjs +0 -5
  62. package/esm2022/public-api.mjs +0 -6
  63. package/fesm2022/ngx-ratio-image.mjs +0 -93
  64. package/fesm2022/ngx-ratio-image.mjs.map +0 -1
  65. package/index.d.ts +0 -5
  66. package/lib/ratio-image/ratio-image.component.d.ts +0 -30
  67. package/lib/ratio-image.module.d.ts +0 -7
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 = tab
7
+ indent_size = 4
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
package/.eslintrc.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "root": true,
3
+ "ignorePatterns": ["projects/**/*"],
4
+ "overrides": [
5
+ {
6
+ "files": ["*.ts"],
7
+ "extends": [
8
+ "eslint:recommended",
9
+ "plugin:@typescript-eslint/recommended",
10
+ "plugin:@angular-eslint/recommended",
11
+ "plugin:@angular-eslint/template/process-inline-templates"
12
+ ],
13
+ "rules": {
14
+ "@angular-eslint/directive-selector": [
15
+ "error",
16
+ {
17
+ "type": "attribute",
18
+ "prefix": "",
19
+ "style": "camelCase"
20
+ }
21
+ ],
22
+ "@angular-eslint/component-selector": [
23
+ "error",
24
+ {
25
+ "type": "element",
26
+ "prefix": "",
27
+ "style": "kebab-case"
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ "files": ["*.html"],
34
+ "extends": ["plugin:@angular-eslint/template/recommended", "plugin:@angular-eslint/template/accessibility"],
35
+ "rules": {}
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,40 @@
1
+ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3
+
4
+ name: Node.js CI
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ push:
9
+ branches: [ "main" ]
10
+ pull_request:
11
+ branches: [ "main" ]
12
+
13
+ env:
14
+ CI: true
15
+ DISPLAY: ':10.0'
16
+ CHROME_BIN: '/usr/bin/chromium'
17
+
18
+
19
+ jobs:
20
+ build:
21
+
22
+ runs-on: ubuntu-latest
23
+ timeout-minutes: 5
24
+ strategy:
25
+ matrix:
26
+ node-version: [ 16.x, 18.x ]
27
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
28
+
29
+ steps:
30
+ - uses: actions/checkout@v3
31
+ - name: Use Node.js ${{ matrix.node-version }}
32
+ uses: actions/setup-node@v3
33
+ with:
34
+ node-version: ${{ matrix.node-version }}
35
+ cache: 'npm'
36
+ - name: Setup Chrome
37
+ uses: browser-actions/setup-chrome@v1.2.0
38
+ - run: npm ci
39
+ - run: npm run build --if-present
40
+ - run: npm run test:ci
@@ -0,0 +1,42 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Node.js Package
5
+
6
+ on:
7
+ release:
8
+ types: [ created ]
9
+
10
+ env:
11
+ CI: true
12
+ DISPLAY: ':10.0'
13
+ CHROME_BIN: '/usr/bin/chromium'
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+ timeout-minutes: 10
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ - uses: actions/setup-node@v3
22
+ with:
23
+ node-version: 16
24
+ - run: npm ci
25
+ - run: npm run build
26
+ - name: Setup Chrome
27
+ uses: browser-actions/setup-chrome@v1.2.0
28
+ - run: npm run test:ci
29
+
30
+ publish-npm:
31
+ needs: build
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - uses: actions/checkout@v3
35
+ - uses: actions/setup-node@v3
36
+ with:
37
+ node-version: 16
38
+ registry-url: https://registry.npmjs.org/
39
+ - run: npm ci
40
+ - run: npm publish
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -0,0 +1,3 @@
1
+ .angular
2
+ package.json
3
+ dist
@@ -0,0 +1,12 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="lint" type="js.build_tools.npm" singleton="false" nameIsGenerated="true">
3
+ <package-json value="$PROJECT_DIR$/package.json" />
4
+ <command value="run" />
5
+ <scripts>
6
+ <script value="lint" />
7
+ </scripts>
8
+ <node-interpreter value="project" />
9
+ <envs />
10
+ <method v="2" />
11
+ </configuration>
12
+ </component>
@@ -0,0 +1,12 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="test" type="js.build_tools.npm" singleton="false" nameIsGenerated="true">
3
+ <package-json value="$PROJECT_DIR$/package.json" />
4
+ <command value="run" />
5
+ <scripts>
6
+ <script value="test" />
7
+ </scripts>
8
+ <node-interpreter value="project" />
9
+ <envs />
10
+ <method v="2" />
11
+ </configuration>
12
+ </component>
@@ -0,0 +1,4 @@
1
+ {
2
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3
+ "recommendations": ["angular.ng-template"]
4
+ }
@@ -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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 gerd-siebert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,105 +1,27 @@
1
- # ngx-ratio-image
1
+ # RatioImage
2
2
 
3
- # ngx-ratio-image - an Angular lib to show an image with variable ratio in container with a fixed ratio.
3
+ This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
4
4
 
5
- - [Features](#features)
6
- - [Installation](#installation)
7
- - [Usage](#usage)
8
- - [Examples](#examples)
9
- - [Available Parameters](#available-parameters)
10
- - [Demo](#demo)
11
- - [Contribute](#contribute)
12
- - [License](#license)
5
+ ## Development server
13
6
 
14
- ## Features
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.
15
8
 
16
- - can display any images in a predefined container
17
- - black bars are avoided with a blurring effect
18
- - non stable-phase with versions smaller 1.0.0, please test and feedback
19
- - tested with Angular 16.1, not working with Angular 15
9
+ ## Code scaffolding
20
10
 
21
- ## Installation
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`.
22
12
 
23
- **Angular 16.1 with ngx-ratio-image**
13
+ ## Build
24
14
 
25
- ```
26
- npm ngx-ratio-image --save
27
- # Or with yarn
28
- yarn add ngx-ratio-image
29
- ```
15
+ Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
30
16
 
31
- # Usage
17
+ ## Running unit tests
32
18
 
33
- ### Import the module and add it to your imports section in your main AppModule:
19
+ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
34
20
 
35
- ```
36
- // File: app.module.ts
37
- // all your other imports...
38
- import { RatioImageModule } from 'ngx-ratio-image';
21
+ ## Running end-to-end tests
39
22
 
40
- @NgModule({
41
- declarations: [
42
- AppComponent
43
- ],
44
- imports: [
45
- RatioImageModule
46
- ],
47
- providers: [],
48
- bootstrap: [AppComponent]
49
- })
50
- export class AppModule { }
51
- ```
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.
52
24
 
53
- ```
54
- // File: app.component.html
55
- // all your HTML...
25
+ ## Further help
56
26
 
57
- <ngx-ratio-image
58
- [src]="'https://dummyimage.com/800x600'"
59
- [width]="1600"
60
- [height]="900"
61
- ></ngx-ratio-image>
62
- ```
63
-
64
- ## Examples
65
-
66
- The source code contains several examples in the folder [`projects/ratio-image-app`](projects/demo-app/src/app) in this repository to show how the output works with different images.
67
-
68
- ## Available Parameters
69
-
70
- | Attribute | Type | Default | Required | Description |
71
- |-----------|---------|---------|----------|---------------------------------------|
72
- | src | string | '' | yes | Allow qrdata to be an empty string |
73
- | width | number | 0 | yes | width of the container in pixels |
74
- | height | number | 0 | yes | height of the container in pixels |
75
- | debug | boolean | false | no | Activate a red border on console text |
76
-
77
-
78
- # Demo
79
-
80
- The source for the angular app is available in [`projects/ratio-image-app`](projects/ratio-image-app). Run the command
81
-
82
- ```
83
- ng serve ratio-image-app --open
84
- ```
85
-
86
- and open the url `http://localhost:4201/` in your browser
87
-
88
- ## AOT - Ahead Of Time Compilation
89
-
90
- AOT Support is not tested, please feed back the result or make a feature request
91
-
92
- ## SSR - Server Side Rendering
93
-
94
- SSR Support is not tested, please feed back the result or make a feature request
95
-
96
- ## Contribute
97
-
98
- - Please open your PR against the main branch.
99
- - Make sure your editor uses **prettier** to minimize commited code changes.
100
-
101
- ## License
102
-
103
- MIT License
104
-
105
- Copyright (c) 2023 - present [Gerd Siebert(gerd.siebert@gmail.com)](mailto:gerd.siebert@gmail.com)
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,144 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "cli": {
5
+ "packageManager": "npm",
6
+ "schematicCollections": ["@angular-eslint/schematics"]
7
+ },
8
+ "newProjectRoot": "projects",
9
+ "projects": {
10
+ "ratioImageApp": {
11
+ "projectType": "application",
12
+ "schematics": {
13
+ "@schematics/angular:component": {
14
+ "style": "scss"
15
+ }
16
+ },
17
+ "root": "projects/ratio-image-app",
18
+ "sourceRoot": "projects/ratio-image-app/src",
19
+ "prefix": "app",
20
+ "architect": {
21
+ "build": {
22
+ "builder": "@angular-devkit/build-angular:browser",
23
+ "options": {
24
+ "outputPath": "dist/ratio-image-app",
25
+ "index": "projects/ratio-image-app/src/index.html",
26
+ "main": "projects/ratio-image-app/src/main.ts",
27
+ "polyfills": ["zone.js"],
28
+ "tsConfig": "projects/ratio-image-app/tsconfig.app.json",
29
+ "inlineStyleLanguage": "scss",
30
+ "assets": ["projects/ratio-image-app/src/favicon.ico", "projects/ratio-image-app/src/assets"],
31
+ "styles": [
32
+ "@angular/material/prebuilt-themes/pink-bluegrey.css",
33
+ "projects/ratio-image-app/src/styles.scss"
34
+ ],
35
+ "scripts": []
36
+ },
37
+ "configurations": {
38
+ "production": {
39
+ "budgets": [
40
+ {
41
+ "type": "initial",
42
+ "maximumWarning": "500kb",
43
+ "maximumError": "1mb"
44
+ },
45
+ {
46
+ "type": "anyComponentStyle",
47
+ "maximumWarning": "2kb",
48
+ "maximumError": "4kb"
49
+ }
50
+ ],
51
+ "outputHashing": "all"
52
+ },
53
+ "development": {
54
+ "buildOptimizer": false,
55
+ "optimization": false,
56
+ "vendorChunk": true,
57
+ "extractLicenses": false,
58
+ "sourceMap": true,
59
+ "namedChunks": true
60
+ }
61
+ },
62
+ "defaultConfiguration": "production"
63
+ },
64
+ "serve": {
65
+ "builder": "@angular-devkit/build-angular:dev-server",
66
+ "configurations": {
67
+ "production": {
68
+ "browserTarget": "ratioImageApp:build:production"
69
+ },
70
+ "development": {
71
+ "browserTarget": "ratioImageApp:build:development"
72
+ }
73
+ },
74
+ "options": {
75
+ "port": 4201
76
+ },
77
+ "defaultConfiguration": "development"
78
+ },
79
+ "extract-i18n": {
80
+ "builder": "@angular-devkit/build-angular:extract-i18n",
81
+ "options": {
82
+ "browserTarget": "ratioImageApp:build"
83
+ }
84
+ },
85
+ "test": {
86
+ "builder": "@angular-devkit/build-angular:karma",
87
+ "options": {
88
+ "polyfills": ["zone.js", "zone.js/testing"],
89
+ "tsConfig": "projects/ratio-image-app/tsconfig.spec.json",
90
+ "inlineStyleLanguage": "scss",
91
+ "assets": ["projects/ratio-image-app/src/favicon.ico", "projects/ratio-image-app/src/assets"],
92
+ "styles": [
93
+ "@angular/material/prebuilt-themes/pink-bluegrey.css",
94
+ "projects/ratio-image-app/src/styles.scss"
95
+ ],
96
+ "scripts": []
97
+ }
98
+ },
99
+ "lint": {
100
+ "builder": "@angular-eslint/builder:lint",
101
+ "options": {
102
+ "lintFilePatterns": ["projects/ratio-image-app/**/*.ts", "projects/ratio-image-app/**/*.html"]
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "ratioImage": {
108
+ "projectType": "library",
109
+ "root": "projects/ngx-ratio-image",
110
+ "sourceRoot": "projects/ngx-ratio-image/src",
111
+ "prefix": "lib",
112
+ "architect": {
113
+ "build": {
114
+ "builder": "@angular-devkit/build-angular:ng-packagr",
115
+ "options": {
116
+ "project": "projects/ngx-ratio-image/ng-package.json"
117
+ },
118
+ "configurations": {
119
+ "production": {
120
+ "tsConfig": "projects/ngx-ratio-image/tsconfig.lib.prod.json"
121
+ },
122
+ "development": {
123
+ "tsConfig": "projects/ngx-ratio-image/tsconfig.lib.json"
124
+ }
125
+ },
126
+ "defaultConfiguration": "production"
127
+ },
128
+ "test": {
129
+ "builder": "@angular-devkit/build-angular:karma",
130
+ "options": {
131
+ "tsConfig": "projects/ngx-ratio-image/tsconfig.spec.json",
132
+ "polyfills": ["zone.js", "zone.js/testing"]
133
+ }
134
+ },
135
+ "lint": {
136
+ "builder": "@angular-eslint/builder:lint",
137
+ "options": {
138
+ "lintFilePatterns": ["projects/ngx-ratio-image/**/*.ts", "projects/ngx-ratio-image/**/*.html"]
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist",
4
+ "lib": {
5
+ "entryFile": "src/public_api.ts"
6
+ },
7
+ "allowedNonPeerDependencies": ["@angular/common"]
8
+ }
package/package.json CHANGED
@@ -1,38 +1,88 @@
1
1
  {
2
2
  "name": "ngx-ratio-image",
3
- "version": "0.0.2",
3
+ "version": "0.0.7",
4
4
  "author": {
5
5
  "name": "Gerd Siebert"
6
6
  },
7
- "description": "Asn Angular lib to show an image with variable ratio in container with a fixed ratio.",
7
+ "contributors": [],
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/gerd-siebert/ngx-ratio-image"
11
+ },
12
+ "keywords": [
13
+ "Image",
14
+ "Scaling",
15
+ "Ratio",
16
+ "Angular 16"
17
+ ],
8
18
  "license": "MIT",
9
- "peerDependencies": {
10
- "@angular/common": "^16.1.0",
11
- "@angular/core": "^16.1.0"
19
+ "main": "dist/ratio-image/esm2022/ratio-image.mjs",
20
+ "scripts": {
21
+ "ng": "ng",
22
+ "prettier": "prettier --write \"**/*.{js,json,css,scss,less,md,ts,html,component.html}\"",
23
+ "start": "ng serve",
24
+ "build": "npm run build:lib && npm run build:lib",
25
+ "build:lib": "ng build --project ratioImage --configuration production ",
26
+ "build:app": "ng build --project ratioImageApp --configuration production ",
27
+ "watch": "ng build --watch --configuration development",
28
+ "test": "ng test",
29
+ "test:ci": "ng test --code-coverage --no-watch --browsers=ChromeHeadless --source-map=false",
30
+ "lint": "ng lint",
31
+ "packagr": "ng-packagr -p ng-package.json",
32
+ "publish": "rm -rf node_modules && npm install && npm run build && cd dist/ratio-image && npm publish && cd ../../"
12
33
  },
34
+ "private": false,
13
35
  "dependencies": {
14
- "tslib": "^2.3.0"
36
+ "@angular/animations": "^16.1.2",
37
+ "@angular/cdk": "^16.1.1",
38
+ "@angular/common": "^16.1.2",
39
+ "@angular/compiler": "^16.1.2",
40
+ "@angular/core": "^16.1.2",
41
+ "@angular/forms": "^16.1.2",
42
+ "@angular/material": "^16.1.1",
43
+ "@angular/platform-browser": "^16.1.2",
44
+ "@angular/platform-browser-dynamic": "^16.1.2",
45
+ "@angular/router": "^16.1.2",
46
+ "rxjs": "~7.8.0",
47
+ "tslib": "^2.3.0",
48
+ "zone.js": "~0.13.0"
15
49
  },
16
- "sideEffects": false,
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/gerd-siebert/ngx-ratio-image.git"
20
- },
21
- "bugs": {
22
- "url": "https://github.com/gerd-siebert/ngx-ratio-image/issues"
50
+ "devDependencies": {
51
+ "@angular-devkit/build-angular": "^16.1.0",
52
+ "@angular-eslint/builder": "16.0.3",
53
+ "@angular-eslint/eslint-plugin": "16.0.3",
54
+ "@angular-eslint/eslint-plugin-template": "16.0.3",
55
+ "@angular-eslint/schematics": "16.0.3",
56
+ "@angular-eslint/template-parser": "16.0.3",
57
+ "@angular/cli": "~16.1.0",
58
+ "@angular/compiler-cli": "^16.1.2",
59
+ "@schuchard/prettier": "5.1.0",
60
+ "@types/jasmine": "~4.3.0",
61
+ "@typescript-eslint/eslint-plugin": "5.59.7",
62
+ "@typescript-eslint/parser": "5.59.7",
63
+ "eslint": "^8.40.0",
64
+ "husky": "latest",
65
+ "jasmine-core": "~4.6.0",
66
+ "karma": "~6.4.0",
67
+ "karma-chrome-launcher": "~3.2.0",
68
+ "karma-coverage": "~2.2.0",
69
+ "karma-jasmine": "~5.1.0",
70
+ "karma-jasmine-html-reporter": "~2.1.0",
71
+ "lint-staged": "latest",
72
+ "ng-packagr": "^16.1.0",
73
+ "prettier": "^2.8.8",
74
+ "rimraf": "^5.0.1",
75
+ "tslint-config-prettier": "latest",
76
+ "typescript": "~5.1.3"
23
77
  },
24
- "homepage": "https://github.com/gerd-siebert/ngx-ratio-image#readme",
25
- "module": "fesm2022/ngx-ratio-image.mjs",
26
- "typings": "index.d.ts",
27
- "exports": {
28
- "./package.json": {
29
- "default": "./package.json"
30
- },
31
- ".": {
32
- "types": "./index.d.ts",
33
- "esm2022": "./esm2022/ngx-ratio-image.mjs",
34
- "esm": "./esm2022/ngx-ratio-image.mjs",
35
- "default": "./fesm2022/ngx-ratio-image.mjs"
78
+ "husky": {
79
+ "hooks": {
80
+ "pre-commit": "lint-staged"
36
81
  }
82
+ },
83
+ "lint-staged": {
84
+ "*.{js,json,css,scss,less,md,ts,html,component.html}": [
85
+ "prettier --write"
86
+ ]
37
87
  }
38
- }
88
+ }
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ printWidth: 120,
3
+ tabWidth: 4,
4
+ useTabs: true,
5
+ semi: true,
6
+ singleQuote: true,
7
+ trailingComma: 'none',
8
+ bracketSpacing: true,
9
+ jsxBracketSameLine: false,
10
+ arrowParens: 'avoid',
11
+ rangeStart: 0,
12
+ rangeEnd: Infinity,
13
+ requirePragma: false,
14
+ insertPragma: false,
15
+ proseWrap: 'preserve'
16
+ };