Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: chore(playground): upgrade umi4 (not work) #755

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions playground/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
// Umi Max 项目
extends: require.resolve('@umijs/max/eslint'),
rules: {
'react/react-in-jsx-scope': 0
}
};
10 changes: 2 additions & 8 deletions playground/.umirc.ts → playground/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { defineConfig } from 'umi';

export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
routes: [
{ path: '/', component: '@/pages/index' },
],
fastRefresh: {},
webpack5: {},
routes: [{ path: '/', component: '@/pages/index' }],
fastRefresh: true,
chainWebpack: (memo) => {
memo.module.rule('ts-in-node_modules').include.clear();
return memo;
Expand Down
12 changes: 4 additions & 8 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "umi dev",
"postinstall": "umi generate tmp",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"test": "umi-test",
"test:coverage": "umi-test --coverage"
"start": "max dev",
"postinstall": "max setup",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
},
"author": {
"name": "AntV",
Expand All @@ -30,8 +28,7 @@
"@types/numeral": "^2.0.2",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.5.20",
"@umijs/max": "^4.0.88",
"lint-staged": "^10.0.7",
"prettier": "^2.2.0",
"typescript": "^4.1.2",
Expand Down Expand Up @@ -62,7 +59,6 @@
"react-dom": "^17.0.2",
"react-json-view": "^1.19.1",
"react-vega": "^7.4.3",
"umi": "^3.5.20",
"vega": "^5.15.0",
"vega-datasets": "^2.2.0",
"vega-lite": "^4.15.0"
Expand Down
2 changes: 1 addition & 1 deletion playground/src/DevPlayground/ChartAdvisor/Chart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef } from 'react';
import React, { useEffect, useRef } from 'react';

import { render } from '@antv/g2';

Expand Down
8 changes: 4 additions & 4 deletions playground/src/DevPlayground/NTV/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* eslint-disable no-template-curly-in-string */
import React, { useState, useEffect } from 'react';
import { useEffect, useState } from 'react';

import { Skeleton, Switch, Divider, Tooltip, Popover, Checkbox } from 'antd';
import { Checkbox, Divider, Popover, Skeleton, Switch, Tooltip } from 'antd';
// import { PlusOutlined, MinusOutlined } from '@ant-design/icons';
import numeral from 'numeral';

import {
createCustomPhraseFactory,
NarrativeTextVis,
NtvPluginManager,
createCustomPhraseFactory,
seedToken,
} from '../../../../packages/ava-react/src';
import { generateTextSpec, NarrativeTextSpec } from '../../../../packages/ava/lib';
import { generateTextSpec, NarrativeTextSpec } from '../../../../packages/ava/src';

import fluctuationData from './mock-data';

Expand Down