From 87d637f40ec68ca81da57848a7c1eca18f83b129 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Wed, 20 Jan 2021 15:17:05 +0800 Subject: [PATCH] less dependencies --- jsExample/package.json | 30 ++++++------------------------ package.json | 4 +++- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/jsExample/package.json b/jsExample/package.json index dd8bec9..de05c5c 100644 --- a/jsExample/package.json +++ b/jsExample/package.json @@ -4,33 +4,14 @@ "private": true, "description": "An out-of-box UI solution for enterprise applications", "scripts": { - "analyze": "cross-env ANALYZE=1 umi build", - "build": "umi build", - "deploy": "npm run site && npm run gh-pages", - "dev": "npm run start:dev", - "fetch:blocks": "pro fetch-blocks && npm run prettier", - "gh-pages": "gh-pages -d dist", - "i18n-remove": "pro i18n-remove --locale=zh-CN --write", - "postinstall": "umi g tmp", - "lint": "umi g tmp && npm run lint:js && npm run lint:style && npm run lint:prettier", + "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier", + "lint-staged": "lint-staged", "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style", - "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", - "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto", + "lint:js": "cross-env TIMING=1 eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", + "lint:prettier": "prettier --check \"**/*\" --end-of-line auto", "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less", - "precommit": "lint-staged", - "prettier": "prettier -c --write \"src/**/*\"", - "start": "cross-env UMI_ENV=dev umi dev", - "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev", - "start:no-mock": "cross-env MOCK=none UMI_ENV=dev umi dev", - "start:no-ui": "cross-env UMI_UI=none UMI_ENV=dev umi dev", - "start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev umi dev", - "start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev umi dev", - "pretest": "node ./tests/beforeTest", - "test": "umi test", - "test:all": "node ./tests/run-tests.js", - "test:component": "umi test ./src/components", - "tsc": "tsc --noEmit" + "prettier": "prettier -c --write \"**/*\"" }, "lint-staged": { "**/*.less": "stylelint --syntax less", @@ -50,6 +31,7 @@ "@ant-design/pro-form": "^1.3.0", "@ant-design/pro-layout": "^6.9.0", "@ant-design/pro-table": "^2.17.0", + "@babel/preset-env": "^7.12.11", "@umijs/route-utils": "^1.0.33", "antd": "^4.9.4", "classnames": "^2.2.6", diff --git a/package.json b/package.json index 1d6501e..048d211 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,11 @@ "dependencies": { "@babel/core": "^7.12.10", "@babel/eslint-parser": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/preset-env": "^7.12.11", + "@babel/preset-react": "^7.12.10", "@typescript-eslint/eslint-plugin": "^4.10.0", "@typescript-eslint/parser": "^4.10.0", - "babel-plugin-transform-decorators-legacy": "^1.3.5", "eslint": "^7.11.0", "eslint-config-airbnb-base": "^14.2.0", "eslint-config-prettier": "^6.13.0",