Skip to content

Commit

Permalink
feat(*): mix Meet into Next
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna authored Nov 28, 2020
1 parent c2dc02f commit 41f615a
Show file tree
Hide file tree
Showing 65 changed files with 407 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"commitmsg": "commitlint -E GIT_PARAMS",
"precommit": "lint-staged",
"changelog": "node ./scripts/changelog.js",
"prepub": "npm run tslint && npm run eslint && npm run stylelint && npm run changelog && npm run build && npm run tslint && npm run check && npm run docs && npm run clear-dist && npm run pack && npm run pack -- minimize && npm run pack-adaptor"
"mix": "node ./scripts/mix.js",
"prepub": "npm run tslint && npm run eslint && npm run stylelint && npm run changelog && npm run build && npm run tslint && npm run check && npm run docs && npm run clear-dist && npm run pack && npm run pack -- minimize && npm run pack-adaptor"
},
"lint-staged": {
"types/**/*.d.ts": [
Expand Down Expand Up @@ -215,6 +216,7 @@
"whatwg-fetch": "^2.0.3"
},
"peerDependencies": {
"@alifd/meet-react": "^1.0.0",
"moment": "^2.22.1",
"react": "^16.0.0",
"react-dom": "^16.0.0"
Expand Down
27 changes: 27 additions & 0 deletions scripts/mix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const fs = require('fs-extra');
const path = require('path');
const glob = require('glob');

// 应该只会用一次,批量生成 mobile 目录及其引用
const cwd = process.cwd();
const { getComponentName } = require('./utils');

const componentPaths = glob.sync(path.join(cwd, 'src', '*'));

componentPaths.forEach(comPath => {
const dashName = path.basename(comPath);
const upperName = getComponentName(path.basename(comPath));
if (['demo-helper', 'core', 'index.js'].indexOf(dashName) > -1) {
return;
}

const srcBasePath = path.join(cwd, 'src', dashName);
const mobileContent = `import { ${upperName} as Meet${upperName} } from "@alifd/meet-react";
import Next${upperName} from "../index";
const ${upperName} = Meet${upperName} ? Meet${upperName} : Next${upperName};
export default ${upperName};
`;
fs.outputFileSync(path.join(srcBasePath, 'mobile/index.jsx'), mobileContent);
});
6 changes: 6 additions & 0 deletions src/affix/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Affix as MeetAffix } from '@alifd/meet-react';
import NextAffix from '../index';

const Affix = MeetAffix ? MeetAffix : NextAffix;

export default Affix;
6 changes: 6 additions & 0 deletions src/animate/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Animate as MeetAnimate } from '@alifd/meet-react';
import NextAnimate from '../index';

const Animate = MeetAnimate ? MeetAnimate : NextAnimate;

export default Animate;
6 changes: 6 additions & 0 deletions src/avatar/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Avatar as MeetAvatar } from '@alifd/meet-react';
import NextAvatar from '../index';

const Avatar = MeetAvatar ? MeetAvatar : NextAvatar;

export default Avatar;
6 changes: 6 additions & 0 deletions src/badge/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Badge as MeetBadge } from '@alifd/meet-react';
import NextBadge from '../index';

const Badge = MeetBadge ? MeetBadge : NextBadge;

export default Badge;
6 changes: 6 additions & 0 deletions src/balloon/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Balloon as MeetBalloon } from '@alifd/meet-react';
import NextBalloon from '../index';

const Balloon = MeetBalloon ? MeetBalloon : NextBalloon;

export default Balloon;
6 changes: 6 additions & 0 deletions src/box/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Box as MeetBox } from '@alifd/meet-react';
import NextBox from '../index';

const Box = MeetBox ? MeetBox : NextBox;

export default Box;
6 changes: 6 additions & 0 deletions src/breadcrumb/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Breadcrumb as MeetBreadcrumb } from '@alifd/meet-react';
import NextBreadcrumb from '../index';

const Breadcrumb = MeetBreadcrumb ? MeetBreadcrumb : NextBreadcrumb;

export default Breadcrumb;
6 changes: 6 additions & 0 deletions src/button/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Button as MeetButton } from '@alifd/meet-react';
import NextButton from '../index';

const Button = MeetButton ? MeetButton : NextButton;

export default Button;
6 changes: 6 additions & 0 deletions src/calendar/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Calendar as MeetCalendar } from '@alifd/meet-react';
import NextCalendar from '../index';

const Calendar = MeetCalendar ? MeetCalendar : NextCalendar;

export default Calendar;
6 changes: 6 additions & 0 deletions src/card/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Card as MeetCard } from '@alifd/meet-react';
import NextCard from '../index';

const Card = MeetCard ? MeetCard : NextCard;

export default Card;
6 changes: 6 additions & 0 deletions src/cascader-select/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { CascaderSelect as MeetCascaderSelect } from '@alifd/meet-react';
import NextCascaderSelect from '../index';

const CascaderSelect = MeetCascaderSelect ? MeetCascaderSelect : NextCascaderSelect;

export default CascaderSelect;
6 changes: 6 additions & 0 deletions src/cascader/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Cascader as MeetCascader } from '@alifd/meet-react';
import NextCascader from '../index';

const Cascader = MeetCascader ? MeetCascader : NextCascader;

export default Cascader;
6 changes: 6 additions & 0 deletions src/checkbox/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Checkbox as MeetCheckbox } from '@alifd/meet-react';
import NextCheckbox from '../index';

const Checkbox = MeetCheckbox ? MeetCheckbox : NextCheckbox;

export default Checkbox;
6 changes: 6 additions & 0 deletions src/collapse/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Collapse as MeetCollapse } from '@alifd/meet-react';
import NextCollapse from '../index';

const Collapse = MeetCollapse ? MeetCollapse : NextCollapse;

export default Collapse;
5 changes: 5 additions & 0 deletions src/config-provider/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import NextConfigProvider from '../index';

const ConfigProvider = NextConfigProvider;

export default ConfigProvider;
6 changes: 6 additions & 0 deletions src/date-picker/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { DatePicker as MeetDatePicker } from '@alifd/meet-react';
import NextDatePicker from '../index';

const DatePicker = MeetDatePicker ? MeetDatePicker : NextDatePicker;

export default DatePicker;
6 changes: 6 additions & 0 deletions src/dialog/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Dialog as MeetDialog } from '@alifd/meet-react';
import NextDialog from '../index';

const Dialog = MeetDialog ? MeetDialog : NextDialog;

export default Dialog;
6 changes: 6 additions & 0 deletions src/divider/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Divider as MeetDivider } from '@alifd/meet-react';
import NextDivider from '../index';

const Divider = MeetDivider ? MeetDivider : NextDivider;

export default Divider;
6 changes: 6 additions & 0 deletions src/drawer/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Drawer as MeetDrawer } from '@alifd/meet-react';
import NextDrawer from '../index';

const Drawer = MeetDrawer ? MeetDrawer : NextDrawer;

export default Drawer;
6 changes: 6 additions & 0 deletions src/dropdown/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Dropdown as MeetDropdown } from '@alifd/meet-react';
import NextDropdown from '../index';

const Dropdown = MeetDropdown ? MeetDropdown : NextDropdown;

export default Dropdown;
6 changes: 6 additions & 0 deletions src/field/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Field as MeetField } from '@alifd/meet-react';
import NextField from '../index';

const Field = MeetField ? MeetField : NextField;

export default Field;
6 changes: 6 additions & 0 deletions src/form/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Form as MeetForm } from '@alifd/meet-react';
import NextForm from '../index';

const Form = MeetForm ? MeetForm : NextForm;

export default Form;
6 changes: 6 additions & 0 deletions src/grid/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Grid as MeetGrid } from '@alifd/meet-react';
import NextGrid from '../index';

const Grid = MeetGrid ? MeetGrid : NextGrid;

export default Grid;
7 changes: 7 additions & 0 deletions src/icon/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Icon as MeetIcon } from '@alifd/meet-react';
import NextIcon from '../index';

const Icon = MeetIcon ? MeetIcon : NextIcon;

Icon.createFromIconfontCN = NextIcon.createFromIconfontCN;
export default Icon;
6 changes: 6 additions & 0 deletions src/input/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Input as MeetInput } from '@alifd/meet-react';
import NextInput from '../index';

const Input = MeetInput ? MeetInput : NextInput;

export default Input;
6 changes: 6 additions & 0 deletions src/list/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { List as MeetList } from '@alifd/meet-react';
import NextList from '../index';

const List = MeetList ? MeetList : NextList;

export default List;
6 changes: 6 additions & 0 deletions src/loading/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Loading as MeetLoading } from '@alifd/meet-react';
import NextLoading from '../index';

const Loading = MeetLoading ? MeetLoading : NextLoading;

export default Loading;
6 changes: 6 additions & 0 deletions src/locale/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Locale as MeetLocale } from '@alifd/meet-react';
import NextLocale from '../index';

const Locale = MeetLocale ? MeetLocale : NextLocale;

export default Locale;
6 changes: 6 additions & 0 deletions src/menu-button/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { MenuButton as MeetMenuButton } from '@alifd/meet-react';
import NextMenuButton from '../index';

const MenuButton = MeetMenuButton ? MeetMenuButton : NextMenuButton;

export default MenuButton;
6 changes: 6 additions & 0 deletions src/menu/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Menu as MeetMenu } from '@alifd/meet-react';
import NextMenu from '../index';

const Menu = MeetMenu ? MeetMenu : NextMenu;

export default Menu;
6 changes: 6 additions & 0 deletions src/message/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Message as MeetMessage } from '@alifd/meet-react';
import NextMessage from '../index';

const Message = MeetMessage ? MeetMessage : NextMessage;

export default Message;
6 changes: 6 additions & 0 deletions src/mixin-ui-state/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { MixinUiState as MeetMixinUiState } from '@alifd/meet-react';
import NextMixinUiState from '../index';

const MixinUiState = MeetMixinUiState ? MeetMixinUiState : NextMixinUiState;

export default MixinUiState;
6 changes: 6 additions & 0 deletions src/nav/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Nav as MeetNav } from '@alifd/meet-react';
import NextNav from '../index';

const Nav = MeetNav ? MeetNav : NextNav;

export default Nav;
6 changes: 6 additions & 0 deletions src/notification/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Notification as MeetNotification } from '@alifd/meet-react';
import NextNotification from '../index';

const Notification = MeetNotification ? MeetNotification : NextNotification;

export default Notification;
6 changes: 6 additions & 0 deletions src/number-picker/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { NumberPicker as MeetNumberPicker } from '@alifd/meet-react';
import NextNumberPicker from '../index';

const NumberPicker = MeetNumberPicker ? MeetNumberPicker : NextNumberPicker;

export default NumberPicker;
6 changes: 6 additions & 0 deletions src/overlay/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Overlay as MeetOverlay } from '@alifd/meet-react';
import NextOverlay from '../index';

const Overlay = MeetOverlay ? MeetOverlay : NextOverlay;

export default Overlay;
6 changes: 6 additions & 0 deletions src/pagination/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Pagination as MeetPagination } from '@alifd/meet-react';
import NextPagination from '../index';

const Pagination = MeetPagination ? MeetPagination : NextPagination;

export default Pagination;
6 changes: 6 additions & 0 deletions src/paragraph/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Paragraph as MeetParagraph } from '@alifd/meet-react';
import NextParagraph from '../index';

const Paragraph = MeetParagraph ? MeetParagraph : NextParagraph;

export default Paragraph;
6 changes: 6 additions & 0 deletions src/progress/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Progress as MeetProgress } from '@alifd/meet-react';
import NextProgress from '../index';

const Progress = MeetProgress ? MeetProgress : NextProgress;

export default Progress;
6 changes: 6 additions & 0 deletions src/radio/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Radio as MeetRadio } from '@alifd/meet-react';
import NextRadio from '../index';

const Radio = MeetRadio ? MeetRadio : NextRadio;

export default Radio;
6 changes: 6 additions & 0 deletions src/range/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Range as MeetRange } from '@alifd/meet-react';
import NextRange from '../index';

const Range = MeetRange ? MeetRange : NextRange;

export default Range;
6 changes: 6 additions & 0 deletions src/rating/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Rating as MeetRating } from '@alifd/meet-react';
import NextRating from '../index';

const Rating = MeetRating ? MeetRating : NextRating;

export default Rating;
6 changes: 6 additions & 0 deletions src/responsive-grid/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ResponsiveGrid as MeetResponsiveGrid } from '@alifd/meet-react';
import NextResponsiveGrid from '../index';

const ResponsiveGrid = MeetResponsiveGrid ? MeetResponsiveGrid : NextResponsiveGrid;

export default ResponsiveGrid;
6 changes: 6 additions & 0 deletions src/search/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Search as MeetSearch } from '@alifd/meet-react';
import NextSearch from '../index';

const Search = MeetSearch ? MeetSearch : NextSearch;

export default Search;
6 changes: 6 additions & 0 deletions src/select/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Select as MeetSelect } from '@alifd/meet-react';
import NextSelect from '../index';

const Select = MeetSelect ? MeetSelect : NextSelect;

export default Select;
6 changes: 6 additions & 0 deletions src/shell/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Shell as MeetShell } from '@alifd/meet-react';
import NextShell from '../index';

const Shell = MeetShell ? MeetShell : NextShell;

export default Shell;
6 changes: 6 additions & 0 deletions src/slider/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Slider as MeetSlider } from '@alifd/meet-react';
import NextSlider from '../index';

const Slider = MeetSlider ? MeetSlider : NextSlider;

export default Slider;
6 changes: 6 additions & 0 deletions src/split-button/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { SplitButton as MeetSplitButton } from '@alifd/meet-react';
import NextSplitButton from '../index';

const SplitButton = MeetSplitButton ? MeetSplitButton : NextSplitButton;

export default SplitButton;
6 changes: 6 additions & 0 deletions src/step/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Step as MeetStep } from '@alifd/meet-react';
import NextStep from '../index';

const Step = MeetStep ? MeetStep : NextStep;

export default Step;
6 changes: 6 additions & 0 deletions src/switch/mobile/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Switch as MeetSwitch } from '@alifd/meet-react';
import NextSwitch from '../index';

const Switch = MeetSwitch ? MeetSwitch : NextSwitch;

export default Switch;
Loading

0 comments on commit 41f615a

Please sign in to comment.