From 72096beb05b6977c412d0b5cb2dad1bf42b39704 Mon Sep 17 00:00:00 2001 From: stbui Date: Thu, 30 May 2019 14:16:19 +0800 Subject: [PATCH] chore: update version 0.8.0 --- README.md | 8 +- angular.json | 59 ++++++++------ browserslist | 12 +++ docs/readme.md | 2 +- src/karma.conf.js => karma.conf.js | 9 ++- ngsw-config.json | 2 +- package.json | 4 +- protractor.conf.js | 28 ------- src/app/home/home.component.html | 2 +- src/browserslist | 11 --- src/index.html | 4 +- src/tsconfig.app.json | 11 --- src/tsconfig.spec.json | 18 ----- src/tslint.json | 17 ---- tsconfig.app.json | 14 ++++ tsconfig.json | 5 +- tsconfig.spec.json | 18 +++++ tslint.json | 123 ++++++++++------------------- 18 files changed, 138 insertions(+), 209 deletions(-) create mode 100644 browserslist rename src/karma.conf.js => karma.conf.js (82%) delete mode 100644 protractor.conf.js delete mode 100644 src/browserslist delete mode 100644 src/tsconfig.app.json delete mode 100644 src/tsconfig.spec.json delete mode 100644 src/tslint.json create mode 100644 tsconfig.app.json create mode 100644 tsconfig.spec.json diff --git a/README.md b/README.md index 14ec1db..6dfcdf9 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ stbui Logo

-基于最新`Angular 7`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。 +基于最新`Angular 8`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。 [![Travis](https://travis-ci.org/stbui/angular-material-app.svg?branch=master)](https://travis-ci.org/stbui/angular-material-app) [![Docker Build Status](https://img.shields.io/docker/build/stbui/angular-material-app.svg?style=flat-square)](https://hub.docker.com/r/stbui/angular-material-app/) @@ -15,9 +15,9 @@ ### Plaform -[![Angular](https://img.shields.io/badge/Angular-7.0.0-brightgreen.svg?style=flat-square)](https://github.com/angular/angular) -[![Angular-cli](https://img.shields.io/badge/Angular.cli-7.0.1-brightgreen.svg?style=square)](https://github.com/angular/angular-cli) -[![Angular Material 2](https://img.shields.io/badge/Material%202-7.0.0-brightgreen.svg?style=square)](https://github.com/angular/material2) +[![Angular](https://img.shields.io/badge/Angular-8.0.0-brightgreen.svg?style=flat-square)](https://github.com/angular/angular) +[![Angular-cli](https://img.shields.io/badge/Angular.cli-8.0.0-brightgreen.svg?style=square)](https://github.com/angular/angular-cli) +[![Angular Material 2](https://img.shields.io/badge/Material%202-8.0.0-brightgreen.svg?style=square)](https://github.com/angular/material2) [![Flex-Layout](https://img.shields.io/badge/Flex.Layout-latest-brightgreen.svg?style=square)](https://github.com/angular/flex-layout) [![Angular FireBase](https://img.shields.io/badge/Firebase-latest-brightgreen.svg?style=square)](https://github.com/angular/angularfire2) [![Angular PWA](https://img.shields.io/badge/PWA-latest-brightgreen.svg?style=square)](https://github.com/angular/angular-cli) diff --git a/angular.json b/angular.json index 9a46079..51d6d17 100644 --- a/angular.json +++ b/angular.json @@ -21,16 +21,25 @@ "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.app.json", + "tsConfig": "tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets", "src/manifest.json" ], "styles": [ - { "input": "node_modules/normalize.css/normalize.css", "bundleName": "lib" }, - { "input": "node_modules/material-design-icons/iconfont/material-icons.css", "bundleName": "lib" }, - { "input": "src/styles.scss", "bundleName": "stbui" } + { + "input": "node_modules/normalize.css/normalize.css", + "bundleName": "lib" + }, + { + "input": "node_modules/material-design-icons/iconfont/material-icons.css", + "bundleName": "lib" + }, + { + "input": "src/styles.scss", + "bundleName": "stbui" + } ], "scripts": [] }, @@ -54,7 +63,14 @@ "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, - "serviceWorker": true + "serviceWorker": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + } + ] }, "production": { "fileReplacements": [ @@ -104,8 +120,8 @@ "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.spec.json", - "karmaConfig": "src/karma.conf.js", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", "styles": [ "styles.scss" ], @@ -120,34 +136,25 @@ "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/**" ] } - } - } - }, - "angular-material-app-e2e": { - "root": "e2e/", - "projectType": "application", - "architect": { + }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "angular-material-app:serve" - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] + "devServerTarget": "test-ng:serve" + }, + "configurations": { + "production": { + "devServerTarget": "test-ng:serve:production" + } } } } diff --git a/browserslist b/browserslist new file mode 100644 index 0000000..8084853 --- /dev/null +++ b/browserslist @@ -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'. \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md index 814e94c..5a9351d 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -1,6 +1,6 @@ # 中后台前端应用框架 -基于最新`Angular 7`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。 +基于最新`Angular 8`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。 - [快速入门](start.md) - [样式](css.md) diff --git a/src/karma.conf.js b/karma.conf.js similarity index 82% rename from src/karma.conf.js rename to karma.conf.js index b6e0042..b0dc7ca 100644 --- a/src/karma.conf.js +++ b/karma.conf.js @@ -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/test-ng'), + reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, reporters: ['progress', 'kjhtml'], @@ -26,6 +26,7 @@ module.exports = function (config) { logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], - singleRun: false + singleRun: false, + restartOnFileChange: true }); -}; \ No newline at end of file +}; diff --git a/ngsw-config.json b/ngsw-config.json index 6dfed3a..029a633 100644 --- a/ngsw-config.json +++ b/ngsw-config.json @@ -2,7 +2,7 @@ "index": "/index.html", "appData": { "name": "angular-material-app", - "description": "基于最新`Angular 7`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。" + "description": "基于最新`Angular 8`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。" }, "assetGroups": [ { diff --git a/package.json b/package.json index 2aaca9a..21f7a3f 100755 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "angular-material-app", - "description": "基于最新`Angular 7`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。", + "description": "基于最新`8`框架与`Material 2`技术的企业级中后台前端应用框架,涵盖了大量的常用组件和基础功能,您可以快速开发各种后台系统,最大程度上帮助企业节省时间成本和费用开支。", "homepage": "https://github.com/stbui/angular-material-app", "bugs": "https://github.com/stbui/angular-material-app/issues", - "version": "0.7.0", + "version": "0.8.0", "license": "MIT", "main": "dist/electron.js", "scripts": { diff --git a/protractor.conf.js b/protractor.conf.js deleted file mode 100644 index 9a03441..0000000 --- a/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './e2e/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: 'e2e/tsconfig.e2e.json' - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; \ No newline at end of file diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 6502d48..0bbc128 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -36,7 +36,7 @@

立即下载

-
当前版本:0.7.0 免费版
+
当前版本:0.8.0 免费版
diff --git a/src/browserslist b/src/browserslist deleted file mode 100644 index 37371cb..0000000 --- a/src/browserslist +++ /dev/null @@ -1,11 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# -# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed - -> 0.5% -last 2 versions -Firefox ESR -not dead -not IE 9-11 \ No newline at end of file diff --git a/src/index.html b/src/index.html index b1dc8af..13f7465 100755 --- a/src/index.html +++ b/src/index.html @@ -6,8 +6,8 @@ 后台管理系统 - Power by stbui - - + + diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json deleted file mode 100644 index 190fd30..0000000 --- a/src/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "types": [] - }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ] -} diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json deleted file mode 100644 index de77336..0000000 --- a/src/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/src/tslint.json b/src/tslint.json deleted file mode 100644 index 52e2c1a..0000000 --- a/src/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] - } -} diff --git a/tsconfig.app.json b/tsconfig.app.json new file mode 100644 index 0000000..31f8397 --- /dev/null +++ b/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "src/test.ts", + "src/**/*.spec.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json index a29d77c..e14c1c4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,11 +5,12 @@ "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, - "module": "es2015", + "module": "esnext", "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "es5", + "importHelpers": true, + "target": "es2015", "typeRoots": [ "node_modules/@types" ], diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 0000000..6400fde --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/tslint.json b/tslint.json index 6ddb6b2..188bd78 100644 --- a/tslint.json +++ b/tslint.json @@ -1,32 +1,32 @@ { - "rulesDirectory": [ - "node_modules/codelyzer" - ], + "extends": "tslint:recommended", "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, + "array-type": false, + "arrow-parens": false, "deprecation": { "severity": "warn" }, - "eofline": true, - "forin": true, - "import-blacklist": [ + "component-class-suffix": true, + "contextual-lifecycle": true, + "directive-class-suffix": true, + "directive-selector": [ true, - "rxjs/Rx" + "attribute", + "app", + "camelCase" ], - "import-spacing": true, - "indent": [ + "component-selector": [ true, - "spaces" + "element", + "app", + "kebab-case" ], - "interface-over-type-literal": true, - "label-position": true, + "import-blacklist": [ + true, + "rxjs/Rx" + ], + "interface-name": false, + "max-classes-per-file": false, "max-line-length": [ true, 140 @@ -43,8 +43,7 @@ ] } ], - "no-arg": true, - "no-bitwise": true, + "no-consecutive-blank-lines": false, "no-console": [ true, "debug", @@ -53,79 +52,41 @@ "timeEnd", "trace" ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, "no-empty": false, - "no-empty-interface": true, - "no-eval": true, "no-inferrable-types": [ true, "ignore-params" ], - "no-misused-new": true, "no-non-null-assertion": true, "no-redundant-jsdoc": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ + "no-var-requires": false, + "object-literal-key-quotes": [ true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" + "as-needed" ], - "prefer-const": true, + "object-literal-sort-keys": false, + "ordered-imports": false, "quotemark": [ true, "single" ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, + "trailing-comma": false, + "no-conflicting-lifecycle": true, + "no-host-metadata-property": true, "no-input-rename": true, + "no-inputs-metadata-property": true, + "no-output-native": true, + "no-output-on-prefix": true, "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} + "no-outputs-metadata-property": true, + "template-banana-in-box": true, + "template-no-negated-async": true, + "use-lifecycle-interface": true, + "use-pipe-transform-interface": true + }, + "rulesDirectory": [ + "codelyzer" + ] +} \ No newline at end of file