Skip to content

Commit

Permalink
example: update Angular example to 16.x (#4642)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 30, 2023
1 parent eddc105 commit 64a7326
Show file tree
Hide file tree
Showing 18 changed files with 1,007 additions and 2,796 deletions.
16 changes: 0 additions & 16 deletions examples/angular-example/.browserslistrc

This file was deleted.

44 changes: 13 additions & 31 deletions examples/angular-example/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,13 @@
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"examples/angular-example/tsconfig.json",
"examples/angular-example/e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
Expand All @@ -37,30 +23,26 @@
}
],
"@typescript-eslint/semi": ["error", "never"],
"dot-notation": "error",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"indent": "error",
"no-empty-function": "off",
"no-shadow": "error",
"no-unused-expressions": "error",
"no-use-before-define": "off",
"quotes": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"semi": ["error", "never"]
}
},
{
"files": ["e2e/**/*.ts"],
"rules": {
"import/no-extraneous-dependencies": "off"
}
},
{
"files": [
"star.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/angular-example/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"configurations": [
{
"name": "ng serve",
"type": "pwa-chrome",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
Expand Down
4 changes: 2 additions & 2 deletions examples/angular-example/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# AngularExample

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.2.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Development server

```
corepack yarn install
corepack yarn build
corepack yarn workspace @uppy/angular prepublishOnly
corepack yarn workspace @uppy-example/angular ng serve
corepack yarn workspace @uppy-example/angular start
```

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.
Expand Down
32 changes: 21 additions & 11 deletions examples/angular-example/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"preserveSymlinks": true,
"outputPath": "dist/angular-example",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
Expand All @@ -42,12 +43,6 @@
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
Expand Down Expand Up @@ -82,10 +77,11 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -95,8 +91,22 @@
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
45 changes: 0 additions & 45 deletions examples/angular-example/karma.conf.js

This file was deleted.

54 changes: 27 additions & 27 deletions examples/angular-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.1.0",
"@angular/common": "^14.1.0",
"@angular/compiler": "^14.1.0",
"@angular/core": "^14.1.0",
"@angular/forms": "^14.1.0",
"@angular/platform-browser": "^14.1.0",
"@angular/platform-browser-dynamic": "^14.1.0",
"@angular/router": "^14.1.0",
"@angular/animations": "^16.2.0",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
"@angular/core": "^16.2.0",
"@angular/forms": "^16.2.0",
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"@uppy/angular": "workspace:*",
"@uppy/core": "workspace:*",
"@uppy/drag-drop": "workspace:*",
"@uppy/google-drive": "workspace:*",
"@uppy/progress-bar": "workspace:*",
"@uppy/tus": "workspace:*",
"@uppy/webcam": "workspace:*",
"rxjs": "~7.5.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.1.2",
"@angular-eslint/builder": "^14.0.2",
"@angular-eslint/eslint-plugin": "^14.0.2",
"@angular-eslint/eslint-plugin-template": "^14.0.2",
"@angular-eslint/schematics": "^14.0.2",
"@angular-eslint/template-parser": "^14.0.2",
"@angular/cli": "~14.2.0",
"@angular/compiler-cli": "^14.1.0",
"@types/jasmine": "~4.0.0",
"@angular-devkit/build-angular": "^16.2.0",
"@angular-eslint/builder": "16.1.1",
"@angular-eslint/eslint-plugin": "16.1.1",
"@angular-eslint/eslint-plugin-template": "16.1.1",
"@angular-eslint/schematics": "16.1.1",
"@angular-eslint/template-parser": "16.1.1",
"@angular/cli": "~16.2.0",
"@angular/compiler-cli": "^16.2.0",
"@types/jasmine": "~4.3.0",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^40.0.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"jasmine-core": "~4.2.0",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.8"
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.1"
}
}
4 changes: 2 additions & 2 deletions examples/angular-example/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import GoogleDrive from '@uppy/google-drive'
<label>
<input
type="checkbox"
(change)="showInline = $event.target.checked"
(change)="showInline = $any($event.target)?.checked"
[checked]="showInline"
/>
Show Dashboard
Expand Down Expand Up @@ -58,7 +58,7 @@ export class AppComponent implements OnInit {

uppy: Uppy = new Uppy({ debug: true, autoProceed: true })

ngOnInit(): void {
ngOnInit (): void {
this.uppy
.use(Webcam)
.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
Expand Down
2 changes: 1 addition & 1 deletion examples/angular-example/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
UppyAngularStatusBarModule,
UppyAngularDragDropModule,
UppyAngularProgressBarModule,
UppyAngularDashboardModalModule
UppyAngularDashboardModalModule,
} from '@uppy/angular'
import { AppComponent } from './app.component'

Expand Down
3 changes: 0 additions & 3 deletions examples/angular-example/src/environments/environment.prod.ts

This file was deleted.

16 changes: 0 additions & 16 deletions examples/angular-example/src/environments/environment.ts

This file was deleted.

8 changes: 1 addition & 7 deletions examples/angular-example/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { enableProdMode } from '@angular/core'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'

import { AppModule } from './app/app.module'
import { environment } from './environments/environment'

if (environment.production) {
enableProdMode()
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err))
.catch(err => console.error(err)) // eslint-disable-line no-console
Loading

0 comments on commit 64a7326

Please sign in to comment.