Skip to content

Commit

Permalink
feat: upgrade to angular 9
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Apr 21, 2020
1 parent 3c3bc70 commit b280769
Show file tree
Hide file tree
Showing 37 changed files with 14,868 additions and 10,668 deletions.
2 changes: 1 addition & 1 deletion .compodocrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "./node_modules/@compodoc/compodoc/src/config/schema.json",
"name": "NgxEditor",
"output": "./docs/",
"tsconfig": "./src/tsconfig.app.json",
"tsconfig": "./tsconfig.docs.json",
"customFavicon": "./src/favicon.ico",
"includes": "./extras",
"includesName": "Wiki",
Expand Down
16 changes: 11 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
/dist
/tmp
/out-tsc
/.ng_build
/.ng_pkg_build
/build
build.tgz
/docs
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
Expand All @@ -28,6 +29,7 @@ build.tgz
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
Expand All @@ -42,3 +44,7 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# Output directories
build/
docs/
2 changes: 1 addition & 1 deletion .huskyrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"hooks": {
"pre-commit": "npm run lint:scripts && npm run lint && npm run test:single-run"
"pre-commit": "npm run lint:scripts && npm run lint && npm run test"
}
}
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required

language: node_js
node_js:
- 8
- 12

branches:
only:
Expand All @@ -20,4 +20,4 @@ before_script:
- sh -e /etc/init.d/xvfb start

script:
- npm run test:single-run
- npm run test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2018 Sibiraj
Copyright (c) 2017-2020 Sibiraj

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
65 changes: 31 additions & 34 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"newProjectRoot": "projects",
"projects": {
"ngx-editor": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
Expand All @@ -21,7 +21,8 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -44,10 +45,21 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
Expand All @@ -73,36 +85,31 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
]
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ngx-editor-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand All @@ -114,18 +121,8 @@
"devServerTarget": "ngx-editor:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
}},
"defaultProject": "ngx-editor"
}
12 changes: 12 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
10 changes: 7 additions & 3 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
Expand All @@ -21,8 +25,8 @@ exports.config = {
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
};
4 changes: 2 additions & 2 deletions e2e/tsconfig.e2e.json → e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
Expand All @@ -10,4 +10,4 @@
"node"
]
}
}
}
7 changes: 4 additions & 3 deletions src/karma.conf.js → karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
dir: require('path').join(__dirname, './coverage/ngx-editor'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
Expand All @@ -26,6 +26,7 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
restartOnFileChange: true
});
};
4 changes: 1 addition & 3 deletions ng-package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory": "./.ng_pkg_build",
"dest": "./build/",
"lib": {
"entryFile": "./src/public_api.ts",
"comments": "none",
"entryFile": "./public_api.ts",
"umdModuleIds": {
"ngx-bootstrap": "ngx-bootstrap"
}
Expand Down
Loading

0 comments on commit b280769

Please sign in to comment.