Skip to content

Commit

Permalink
Merge pull request #12 from bootng/a9c451b
Browse files Browse the repository at this point in the history
Upgrading to Angular 13
  • Loading branch information
siddharthagit authored Nov 11, 2022
2 parents dd1fb31 + dbc3de5 commit 52c0694
Show file tree
Hide file tree
Showing 17 changed files with 337 additions and 178 deletions.
139 changes: 67 additions & 72 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,126 +3,121 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"wordcombinerapp": {
"agartalafyi": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"outputPath": "dist/agartalafyi",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/favicon.ico"
"src/manifest.webmanifest"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css"
]
"src/styles.css"
],
"scripts": [],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "1500kb",
"maximumError": "11mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "12kb",
"maximumError": "41kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "wordcombinerapp:build"
},
"configurations": {
"production": {
"browserTarget": "wordcombinerapp:build:production"
"browserTarget": "agartalafyi:build:production"
},
"development": {
"browserTarget": "agartalafyi:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "wordcombinerapp:build"
"browserTarget": "agartalafyi:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/font-awesome/css/font-awesome.min.css"
],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"src/manifest.webmanifest"
],
"exclude": []
}
}
}
},
"wordcombinerapp-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "wordcombiner:serve"
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/@angular/material/prebuilt-themes/purple-green.css",
"src/styles.css",
"src/structure.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"deploy": {
"builder": "@angular/fire:deploy",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": []
"prerender": false,
"ssr": false,
"browserTarget": "agartalafyi:build:production",
"firebaseProject": "agtfyi",
"firebaseHostingSite": "agtfyi"
}
}
}
}
},
"defaultProject": "wordcombinerapp",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
"defaultProject": "agartalafyi"
}
29 changes: 21 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
Expand All @@ -9,23 +9,36 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/agartalafyi'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},

reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
restartOnFileChange: true
});
};
30 changes: 30 additions & 0 deletions ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
]
}
}
]
}
82 changes: 35 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,48 @@
{
"name": "webcombinerapp",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"buildk": "webpack",
"start": "ng serve",
"build": "ng build",
"start": "webpack-dev-server --port=4200",
"test": "karma start ./karma.conf.js",
"pree2e": "webdriver-manager update --standalone false --gecko false --quiet",
"e2e": "protractor ./protractor.conf.js"
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.1.0",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/forms": "^6.1.0",
"@angular/http": "^6.1.0",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"angular-cli-ghpages": "^0.6.2",
"bootstrap": "^4.0.0",
"core-js": "^2.5.3",
"portfinder": "^1.0.13",
"rxjs": "^6.2.2",
"rxjs-compat": "^6.0.0-rc.0",
"webpack-cli": "^3.1.0",
"zone.js": "^0.8.20"
"@angular/animations": "~13.3.0",
"@angular/cdk": "^13.3.9",
"@angular/common": "~13.3.0",
"@angular/compiler": "~13.3.0",
"@angular/core": "~13.3.0",
"@angular/fire": "^7.4.1",
"@angular/flex-layout": "^13.0.0-beta.36",
"@angular/forms": "~13.3.0",
"@angular/material": "^13.3.9",
"@angular/platform-browser": "~13.3.0",
"@angular/platform-browser-dynamic": "~13.3.0",
"@angular/router": "~13.3.0",
"@angular/service-worker": "~13.3.0",
"bootstrap": "^5.2.0",
"bootstrap-slider": "^11.0.2",
"font-awesome": "^4.7.0",
"registry.npmjs.org": "^1.0.1",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0",
"@angular/cli": "~6.1.1",
"@angular/compiler-cli": "^6.1.0",
"@angular/language-service": "^6.1.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.5.3",
"codelyzer": "~4.4.2",
"install": "^0.12.2",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.5",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^1.2.0",
"ng-snotify": "^4.3.1",
"npm": "^6.4.1",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~2.9.2",
"webpack": "~4.16.2",
"webpack-dev-server": "^3.1.5"
"@angular-devkit/build-angular": "~13.3.7",
"@angular/cli": "~13.3.7",
"@angular/compiler-cli": "~13.3.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.6.2"
}
}
2 changes: 0 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { httpFactory } from "./common/services/http.factory";
import { AboutComponent, WordMergerComponent } from './index'

const routes: Routes = [
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
//import { Subscription } from 'rxjs/Subscription';
import { Router, CanActivate } from '@angular/router';
@Component({
moduleId: "module.id",
Expand All @@ -10,7 +10,7 @@ export class AppComponent implements OnInit {

public showSideBar = true;
activeClassBool = false;
compCommunicateSubscription: Subscription;
//compCommunicateSubscription: Subscription;

constructor(
router: Router ) {
Expand Down
Loading

0 comments on commit 52c0694

Please sign in to comment.