Skip to content

Commit

Permalink
chore: update package
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Apr 25, 2021
1 parent 157d560 commit ea8c694
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 38 deletions.
30 changes: 23 additions & 7 deletions antd-tools/getWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ const path = require('path');
const webpack = require('webpack');
const WebpackBar = require('webpackbar');
const { merge } = require('webpack-merge');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const postcssConfig = require('./postcssConfig');
const CleanUpStatsPlugin = require('./utils/CleanUpStatsPlugin');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

Expand Down Expand Up @@ -141,7 +139,12 @@ function getWebpackConfig(modules) {
},
{
loader: 'postcss-loader',
options: Object.assign({}, postcssConfig, { sourceMap: true }),
options: {
postcssOptions: {
plugins: ['autoprefixer'],
},
sourceMap: true,
},
},
],
},
Expand All @@ -157,7 +160,12 @@ function getWebpackConfig(modules) {
},
{
loader: 'postcss-loader',
options: Object.assign({}, postcssConfig, { sourceMap: true }),
options: {
postcssOptions: {
plugins: ['autoprefixer'],
},
sourceMap: true,
},
},
{
loader: 'less-loader',
Expand Down Expand Up @@ -215,9 +223,17 @@ All rights reserved.
config.output.libraryTarget = 'umd';
config.optimization = {
minimizer: [
new TerserPlugin({
sourceMap: true,
}),
// eslint-disable-next-line no-unused-vars
compiler => {
return () => {
return {
parallel: true,
terserOptions: {
warnings: false,
},
};
};
},
],
};

Expand Down
6 changes: 0 additions & 6 deletions antd-tools/postcssConfig.js

This file was deleted.

7 changes: 2 additions & 5 deletions antd-tools/transformLess.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { readFileSync } = require('fs');
const path = require('path');
const postcss = require('postcss');
const NpmImportPlugin = require('less-plugin-npm-import');
const postcssConfig = require('./postcssConfig');
const autoprefixer = require('autoprefixer');

function transformLess(lessFile, config = {}) {
const { cwd = process.cwd() } = config;
Expand All @@ -21,10 +21,7 @@ function transformLess(lessFile, config = {}) {
};
return less
.render(data, lessOpts)
.then(result => {
const source = result.css;
return postcss(postcssConfig.plugins).process(source, { from: undefined });
})
.then(result => postcss([autoprefixer]).process(result.css, { from: undefined }))
.then(r => {
return r.css;
});
Expand Down
10 changes: 8 additions & 2 deletions components/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { App, defineComponent, Plugin } from 'vue';
import T, { defaultTableProps } from './Table';
import Column from './Column';
import ColumnGroup from './ColumnGroup';
import { getOptionProps, getKey, getPropsData, getSlot, flattenChildren } from '../_util/props-util';
import {
getOptionProps,
getKey,
getPropsData,
getSlot,
flattenChildren,
} from '../_util/props-util';

const Table = defineComponent({
name: 'ATable',
Expand All @@ -12,7 +18,7 @@ const Table = defineComponent({
props: defaultTableProps,
methods: {
normalize(elements = []) {
const flattenElements = flattenChildren(elements)
const flattenElements = flattenChildren(elements);
const columns = [];
flattenElements.forEach(element => {
if (!element) {
Expand Down
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"pre-publish": "node ./scripts/prepub && npm run generator-webtypes",
"prettier": "prettier -c --write '**/*'",
"pretty-quick": "pretty-quick",
"dist": "node --max_old_space_size=6144 antd-tools/cli/run.js dist",
"dist": "node --max_old_space_size=8192 antd-tools/cli/run.js dist",
"lint": "eslint -c ./.eslintrc --fix --ext .jsx,.js,.vue,.ts,.tsx ./components",
"lint:style": "stylelint \"{site,components}/**/*.less\" --syntax less",
"codecov": "codecov"
Expand Down Expand Up @@ -81,7 +81,7 @@
"@babel/preset-typescript": "^7.10.4",
"@commitlint/cli": "^12.0.0",
"@commitlint/config-conventional": "^12.0.0",
"@octokit/rest": "^16.0.0",
"@octokit/rest": "^18.0.0",
"@types/fs-extra": "^9.0.8",
"@types/lodash-es": "^4.17.3",
"@types/raf": "^3.4.0",
Expand All @@ -94,8 +94,8 @@
"@vue/eslint-config-typescript": "^7.0.0",
"@vue/test-utils": "^2.0.0-0",
"@webpack-cli/serve": "^1.3.1",
"acorn": "^7.0.0",
"autoprefixer": "^9.6.0",
"acorn": "^8.0.0",
"autoprefixer": "^10.2.0",
"axios": "^0.21.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^26.1.0",
Expand All @@ -104,25 +104,25 @@
"babel-plugin-inline-import-data-uri": "^1.0.1",
"babel-plugin-istanbul": "^6.0.0",
"case-sensitive-paths-webpack-plugin": "^2.1.2",
"chalk": "^3.0.0",
"chalk": "^4.1.0",
"cheerio": "^1.0.0-rc.2",
"codecov": "^3.0.0",
"colorful": "^2.1.0",
"commander": "^4.0.0",
"commander": "^7.2.0",
"compare-versions": "^3.3.0",
"cross-env": "^7.0.0",
"css-loader": "^3.0.0",
"deep-assign": "^2.0.0",
"css-loader": "^5.0.0",
"deep-assign": "^3.0.0",
"docsearch.js": "^2.6.3",
"enquire-js": "^0.2.1",
"eslint": "^6.8.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-markdown": "^2.0.0-alpha.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^7.1.0",
"fetch-jsonp": "^1.1.3",
"fs-extra": "^8.0.0",
"fs-extra": "^9.0.0",
"glob": "^7.1.2",
"gulp": "^4.0.1",
"gulp-babel": "^8.0.0",
Expand All @@ -140,20 +140,20 @@
"json-templater": "^1.2.0",
"jsonp": "^0.2.1",
"less": "^4.0.0",
"less-loader": "^7.0.0",
"less-loader": "^8.0.0",
"less-plugin-npm-import": "^2.1.0",
"less-vars-to-js": "^1.3.0",
"lint-staged": "^10.0.0",
"marked": "0.3.18",
"merge2": "^1.2.1",
"mini-css-extract-plugin": "^0.10.0",
"mini-css-extract-plugin": "^1.5.0",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mockdate": "^2.0.2",
"nprogress": "^0.2.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss": "^7.0.6",
"postcss-loader": "^3.0.0",
"postcss": "^8.2.12",
"postcss-loader": "^5.0.0",
"prettier": "^1.18.2",
"pretty-quick": "^2.0.0",
"prismjs": "^1.20.0",
Expand All @@ -164,17 +164,16 @@
"rucksack-css": "^1.0.2",
"selenium-server": "^3.0.1",
"semver": "^7.0.0",
"style-loader": "^1.0.0",
"style-loader": "^2.0.0",
"stylelint": "^13.0.0",
"stylelint-config-prettier": "^8.0.0",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^22.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
"stylelint-order": "^4.0.0",
"terser-webpack-plugin": "^3.0.3",
"through2": "^3.0.0",
"ts-jest": "^26.4.1",
"ts-loader": "^8.1.0",
"ts-loader": "^9.1.0",
"typescript": "^4.2.0",
"umi-mock-middleware": "^1.0.0",
"umi-request": "^1.3.5",
Expand Down

0 comments on commit ea8c694

Please sign in to comment.