zmp-cli 3.12.0-rc.1 → 3.12.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,22 +10,20 @@ module.exports = (options) => {
|
|
|
10
10
|
${
|
|
11
11
|
template === 'blank'
|
|
12
12
|
? `
|
|
13
|
-
import {
|
|
14
|
-
Page
|
|
15
|
-
} from 'zmp-ui';
|
|
13
|
+
import { Page } from 'zmp-ui';
|
|
16
14
|
`.trim()
|
|
17
15
|
: `
|
|
18
16
|
import {
|
|
19
17
|
List,
|
|
20
18
|
Page,
|
|
21
|
-
Icon
|
|
19
|
+
Icon,
|
|
20
|
+
useNavigate
|
|
22
21
|
} from 'zmp-ui';${stateManagement === 'recoil' ? `
|
|
23
22
|
import { useRecoilValue } from 'recoil';
|
|
24
23
|
import { userInfo } from "zmp-sdk";
|
|
25
24
|
import { userState } from '../state';` : ''}
|
|
26
25
|
${template !=='blank' ?`
|
|
27
26
|
import UserCard from '../components/user-card';
|
|
28
|
-
import { useNavigate } from 'react-router-dom'
|
|
29
27
|
`:''}
|
|
30
28
|
`.trim()
|
|
31
29
|
}
|
|
@@ -76,13 +74,12 @@ module.exports = (options) => {
|
|
|
76
74
|
import {
|
|
77
75
|
List,
|
|
78
76
|
Page,
|
|
79
|
-
Icon
|
|
77
|
+
Icon,useNavigate
|
|
80
78
|
} from 'zmp-ui';${stateManagement === 'recoil' ? `
|
|
81
79
|
import { useRecoilValue } from 'recoil';
|
|
82
80
|
import { userState } from '../state';` : ''}
|
|
83
81
|
${template !=='blank' ?`
|
|
84
82
|
import UserCard from '../components/user-card';
|
|
85
|
-
import { useNavigate } from 'react-router-dom'
|
|
86
83
|
`:''}
|
|
87
84
|
`.trim()
|
|
88
85
|
}
|
|
@@ -10,8 +10,7 @@ module.exports = (options) => {
|
|
|
10
10
|
0,
|
|
11
11
|
`
|
|
12
12
|
import React from "react";
|
|
13
|
-
import { Sheet, Button, Page, Text } from "zmp-ui";
|
|
14
|
-
import { useNavigate } from 'react-router-dom'
|
|
13
|
+
import { Sheet, Button, Page, Text, useNavigate } from "zmp-ui";
|
|
15
14
|
|
|
16
15
|
const AboutPage: React.FunctionComponent = (props) => {
|
|
17
16
|
const [actionSheetOpened, setActionSheetOpened] = React.useState(false);
|
|
@@ -71,8 +70,7 @@ module.exports = (options) => {
|
|
|
71
70
|
0,
|
|
72
71
|
`
|
|
73
72
|
import React from "react";
|
|
74
|
-
import { Sheet, Button, Page, Text } from "zmp-ui";
|
|
75
|
-
import { useNavigate } from 'react-router-dom'
|
|
73
|
+
import { Sheet, Button, Page, Text, useNavigate } from "zmp-ui";
|
|
76
74
|
|
|
77
75
|
const AboutPage = (props) => {
|
|
78
76
|
const [actionSheetOpened, setActionSheetOpened] = React.useState(false);
|
|
@@ -9,8 +9,7 @@ module.exports = (options) => {
|
|
|
9
9
|
0,
|
|
10
10
|
`
|
|
11
11
|
import React from "react";
|
|
12
|
-
import { Avatar, List, Text, Box, Page, Button, Icon } from "zmp-ui";
|
|
13
|
-
import {useNavigate} from 'react-router-dom';
|
|
12
|
+
import { Avatar, List, Text, Box, Page, Button, Icon, useNavigate } from "zmp-ui";
|
|
14
13
|
import { useRecoilValue } from "recoil";
|
|
15
14
|
import { userState } from "../state";
|
|
16
15
|
import { userInfo } from "zmp-sdk";
|
|
@@ -62,8 +61,7 @@ module.exports = (options) => {
|
|
|
62
61
|
0,
|
|
63
62
|
`
|
|
64
63
|
import React from "react";
|
|
65
|
-
import { Avatar, List, Text, Box, Page, Button, Icon } from "zmp-ui";
|
|
66
|
-
import {useNavigate} from 'react-router-dom';
|
|
64
|
+
import { Avatar, List, Text, Box, Page, Button, Icon, useNavigate } from "zmp-ui";
|
|
67
65
|
import { useRecoilValue } from "recoil";
|
|
68
66
|
import { userState } from "../state";
|
|
69
67
|
|
|
@@ -14,7 +14,7 @@ module.exports = function generatePackageJson(options) {
|
|
|
14
14
|
// Dependencies
|
|
15
15
|
const dependencies =
|
|
16
16
|
package === 'zmp-ui'
|
|
17
|
-
? ['zmp-ui', 'zmp-sdk']
|
|
17
|
+
? ['zmp-ui', 'zmp-sdk', 'react-router-dom']
|
|
18
18
|
: ['zmp-framework', 'zmp-sdk', 'swiper'];
|
|
19
19
|
const dependenciesVue = ['vue@3', 'zmp-framework'];
|
|
20
20
|
const dependenciesReact = ['react', 'react-dom', 'prop-types'];
|
|
@@ -38,6 +38,9 @@ module.exports = function generatePackageJson(options) {
|
|
|
38
38
|
|
|
39
39
|
if (framework === 'react-typescript') {
|
|
40
40
|
dependencies.push(...dependenciesReactTs);
|
|
41
|
+
if (package === 'zmp-ui') {
|
|
42
|
+
dependencies.push('@types/react-router-dom');
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
const devDependencies = [
|
|
43
46
|
'cross-env',
|