Skip to content

Commit

Permalink
build(ng): update all dependencies and configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra committed Sep 20, 2023
1 parent 1d9190c commit f2bf156
Show file tree
Hide file tree
Showing 16 changed files with 12,616 additions and 15,282 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
37 changes: 11 additions & 26 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,13 @@
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"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,24 +23,23 @@
"style": "camelCase"
}
],
"@typescript-eslint/explicit-member-accessibility": [
"off",
"@angular-eslint/component-selector": [
"error",
{
"accessibility": "explicit"
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@typescript-eslint/no-use-before-define": "error",
"arrow-parens": ["off", "always"],
"import/order": "off",
"space-before-function-paren": ["error", "always"]
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
}
Expand Down
34 changes: 22 additions & 12 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"nw-angular": {
"nw-angular-example": {
"projectType": "application",
"schematics": {},
"schematics": {
"@schematics/angular:component": {
"style": "css"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/nw-angular",
"outputPath": "dist/nw-angular-example",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
Expand Down Expand Up @@ -57,26 +63,30 @@
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "nw-angular:build"
},
"configurations": {
"production": {
"browserTarget": "nw-angular:build:production"
}
"browserTarget": "nw-angular-example:build:production"
},
"development": {
"browserTarget": "nw-angular-example:build:development"
},
"defaultConfiguration": "development"
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "nw-angular:build"
"browserTarget": "nw-angular-example:build"
}
},
"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": [
Expand All @@ -101,8 +111,8 @@
}
}
},
"defaultProject": "nw-angular",
"cli": {
"analytics": false,
"defaultCollection": "@angular-eslint/schematics"
}
}
8 changes: 0 additions & 8 deletions browserslist

This file was deleted.

27 changes: 15 additions & 12 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath();

module.exports = function (config) {
config.set({
basePath: '',
Expand All @@ -9,24 +12,24 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/nw-angular'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/nw-angular-example'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
browsers: ['ChromeHeadless'],
singleRun: true
});
};
Loading

0 comments on commit f2bf156

Please sign in to comment.