Browse Source

chore: 更新依赖

es6
iapyang 5 years ago
parent
commit
6b59b752f6
  1. 7
      .eslintrc
  2. 25
      Gruntfile.js
  3. 78
      package.json
  4. 3
      tsconfig.json
  5. 8
      typescript/index.ts
  6. 4400
      yarn.lock

7
.eslintrc

@ -55,7 +55,7 @@
// 函数
"no-dupe-args": "error",
// 禁止在 function 定义中出现重复的参数
"space-before-function-paren": "error",
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
// 函数括号前必须要有空格
// 变量
@ -123,10 +123,7 @@
// 逗号
"comma-style": "error",
// 逗号必须放在行末
"comma-dangle": [
"error",
"never"
],
"comma-dangle": ["error", "always-multiline"], // 多行对象字面量中要求拖尾逗号,
// 多行对象字面量中要求不要拖尾逗号
"comma-spacing": [
"error",

25
Gruntfile.js

@ -1,13 +1,11 @@
module.exports = function (grunt) {
const filterPath = function (patterns) {
return grunt.file.expand({
function sync(patterns) {
return [...new Set(grunt.file.expand({
filter: function (path) {
return !new RegExp(/__test__/g).test(path);
}
}, patterns);
};
},
}, patterns))];
}
// Project configuration.
grunt.initConfig({
@ -21,7 +19,7 @@ module.exports = function (grunt) {
dest: "dist/polyfill.js"
},
coreJs: {
src: filterPath([
src: sync([
"src/core/foundation.js",
"src/core/lodash.js",
// 'src/core/mvc/**/*.js',
@ -45,7 +43,7 @@ module.exports = function (grunt) {
// 最基础的控件
baseJs: {
src: filterPath([
src: sync([
"src/third/**/*.js",
"src/base/pane.js",
"src/base/single/single.js",
@ -67,14 +65,14 @@ module.exports = function (grunt) {
},
// 实现好的一些基础实例
caseJs: {
src: filterPath([
src: sync([
"src/case/combo/popup.bubble.js",
"src/case/**/*.js"
]),
dest: "dist/case.js"
},
widgetJs: {
src: filterPath([
src: sync([
"src/widget/**/*.js",
"src/component/**/*.js"
]),
@ -150,7 +148,7 @@ module.exports = function (grunt) {
},
fineuiWithoutJqueryAndPolyfillJs: {
src: filterPath(["src/core/foundation.js",
src: sync(["src/core/foundation.js",
"src/core/lodash.js",
// 'src/core/mvc/**/*.js',
"src/core/base.js",
@ -234,7 +232,6 @@ module.exports = function (grunt) {
}
},
less: {
demo: {
expand: true,
@ -423,7 +420,7 @@ module.exports = function (grunt) {
grunt.file.write(dest, JSON.stringify(stat));
});
var defaultTask = ["clean", "less", "concat", "connect", "watch"];
var defaultTask = ["clean", "less", "concat", "watch"];
grunt.registerTask("default", defaultTask);
grunt.registerTask("compile", function () {
grunt.config.set("connect.options.open", false);

78
package.json

@ -5,38 +5,70 @@
"main": "typescript/index.ts",
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"chai": "^4.2.0",
"eslint": "^6.0.1",
"express": "^4.15.2",
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-less": "^1.4.1",
"grunt-contrib-uglify": "^1.0.1",
"grunt-contrib-watch": "^1.0.0",
"karma": "^3.1.4",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.2",
"karma-mocha": "^1.3.0",
"mocha": "^5.2.0",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "7.5.0",
"@babel/plugin-proposal-decorators": "7.4.4",
"@babel/plugin-transform-block-scoping": "7.5.5",
"@babel/plugin-transform-classes": "7.5.5",
"@babel/plugin-transform-modules-commonjs": "7.5.0",
"@babel/plugin-transform-proto-to-assign": "7.5.5",
"@babel/polyfill": "7.4.4",
"@babel/preset-env": "7.4.5",
"@babel/preset-typescript": "7.3.3",
"@typescript-eslint/eslint-plugin": "1.11.0",
"@typescript-eslint/parser": "1.11.0",
"autoprefixer": "9.6.1",
"babel-loader": "8.0.6",
"chai": "4.2.0",
"css-loader": "3.0.0",
"es6-promise": "4.2.8",
"eslint": "6.0.1",
"express": "4.15.2",
"fork-ts-checker-webpack-plugin": "1.4.3",
"grunt": "1.0.1",
"grunt-contrib-clean": "1.1.0",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-connect": "1.0.2",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-cssmin": "1.0.1",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-less": "1.4.1",
"grunt-contrib-uglify": "1.0.1",
"grunt-contrib-watch": "1.0.0",
"grunt-webpack": "3.1.3",
"html-webpack-plugin": "3.2.0",
"karma": "3.1.4",
"karma-chai": "0.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-coverage": "1.1.2",
"karma-mocha": "1.3.0",
"less-loader": "5.0.0",
"mini-css-extract-plugin": "0.7.0",
"mocha": "5.2.0",
"npm-run-all": "4.1.5",
"open": "0.0.5",
"typescript": "^3.5.2"
"optimize-css-assets-webpack-plugin": "5.0.3",
"postcss-loader": "3.0.0",
"postcss-simple-vars": "5.0.2",
"source-map-loader": "0.2.4",
"style-loader": "0.23.1",
"typescript": "3.5.2",
"uglifyjs-webpack-plugin": "2.2.0",
"webpack": "4.35.2",
"webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2",
"webpack-merge": "4.2.1"
},
"scripts": {
"grunt": "grunt",
"webpack:dev": "webpack-dev-server -p --progress --config=webpack/webpack.dev.js --mode development",
"start": "node server.js",
"build": "grunt build",
"compile": "grunt compile",
"fake": "grunt fake-build",
"test": "karma start",
"analyze": "grunt analyze"
"analyze": "grunt analyze",
"dev": "npm-run-all --parallel grunt webpack:dev"
},
"repository": {
"type": "git",

3
tsconfig.json

@ -22,6 +22,7 @@
},
"include": [
"typescript/*.ts",
"typescript/**/*.ts"
"typescript/**/*.ts",
"types/*.d.ts"
]
}

8
typescript/index.ts

@ -1,3 +1,5 @@
import * as decorator from "./core/decorator/decorator";
import { _i18n } from "./core/i18n";
import { _OB } from "./core/ob";
import { _func } from "./core/func";
@ -14,7 +16,6 @@ import { _RedMarkBehavior } from "./core/behavior/behavior.redmark";
import { _Pane, _PaneStatic } from "./base/pane";
import { _LoadingPane } from "./case/loading/loading_pane";
type ClassConstructor<T extends {}> = T & {
new(config: any): T;
(config: any): T;
@ -36,4 +37,9 @@ export interface _BI extends _func, _i18n, _base {
RedMarkBehavior: ClassConstructor<_RedMarkBehavior>;
Pane: ClassConstructor<_Pane> & _PaneStatic;
LoadingPane: ClassConstructor<_LoadingPane>;
Decorators: typeof decorator;
}
BI = BI.extend(BI, {
Decorators: decorator,
});

4400
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save