Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 19 #182

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ the <a href="https://github.com/basst314/ngx-webcam-demo" target="_blank">Demo-P

**Note:** For older versions of Angular/TypeScript, please use previous releases of this library.

- Angular: `>=13.0.0`
- Typescript: `>=4.4.4`
- Angular: `>=19.0.0`
- Typescript: `>=5.6.3`
- RxJs: `>=6.6.0`
- **Important:** Your app must be served on a secure context using `https://` or on localhost, for modern browsers to
permit WebRTC/UserMedia access.
Expand All @@ -53,11 +53,11 @@ the <a href="https://github.com/basst314/ngx-webcam-demo" target="_blank">Demo-P
2. Import the `WebcamModule` into your Angular module:

```typescript
import {WebcamModule} from 'ngx-webcam';
import {WebcamComponent} from 'ngx-webcam';

@NgModule({
imports: [
WebcamModule,
WebcamComponent,
...
],
...
Expand All @@ -68,7 +68,7 @@ export class AppModule {

3. Use the `WebcamComponent` on your pages:

`<webcam></webcam>`
`<ngx-webcam></ngx-webcam>`

As simple as that.

Expand Down
52 changes: 22 additions & 30 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist",
"outputPath": {
"base": "dist"
},
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"assets": [
"src/assets",
"src/favicon.ico"
Expand All @@ -24,12 +28,11 @@
"src/styles.scss"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"namedChunks": true,
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -44,8 +47,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -59,34 +60,26 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-webcam:build"
"buildTarget": "ngx-webcam:build"
},
"configurations": {
"production": {
"browserTarget": "ngx-webcam:build:production"
"buildTarget": "ngx-webcam:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx-webcam:build"
"buildTarget": "ngx-webcam:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.scss"
],
"assets": [
"src/assets",
"src/favicon.ico"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
Expand All @@ -107,17 +100,16 @@
}
}
},
"defaultProject": "ngx-webcam",
"schematics": {
"@schematics/angular:component": {
"prefix": "",
"prefix": "ngx",
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": ""
"prefix": "ngx"
}
},
"cli": {
"analytics": "9dd122c2-0abe-4e3d-8bb5-33a9b7a1321c"
}
}
}
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.ef46db3751d8e999.css"></head>
<body>
<approot></approot>
<app-root></app-root>
<script src="runtime.a281ae2b4dd178c5.js" type="module"></script><script src="polyfills.e24170126eb2c264.js" type="module"></script><script src="main.720aa27968dc5f2c.js" type="module"></script>

</body></html>
</body></html>
14 changes: 0 additions & 14 deletions e2e/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions e2e/app.po.ts

This file was deleted.

14 changes: 0 additions & 14 deletions e2e/tsconfig.e2e.json

This file was deleted.

43 changes: 43 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");

module.exports = tseslint.config(
{
files: ["**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
rules: {
"@angular-eslint/directive-selector": [
"error",
{
type: "attribute",
prefix: "ngx",
style: "camelCase",
},
],
"@angular-eslint/component-selector": [
"error",
{
type: "element",
prefix: "ngx",
style: "kebab-case",
},
],
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
rules: {},
}
);
39 changes: 0 additions & 39 deletions karma.conf.js

This file was deleted.

Loading