@momo-kits/foundation 0.92.7-rc.21 → 0.92.7-rc.22
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.
- package/Application/BottomSheet.tsx +216 -0
- package/Application/BottomTab/BottomTabBar.tsx +62 -223
- package/Application/BottomTab/index.tsx +15 -11
- package/Application/Components.tsx +291 -45
- package/Application/Localize.ts +44 -0
- package/Application/ModalScreen.tsx +11 -181
- package/Application/Navigation.ts +4 -18
- package/Application/NavigationContainer.tsx +10 -28
- package/Application/Navigator.ts +14 -16
- package/Application/StackScreen.tsx +222 -42
- package/Application/index.ts +5 -3
- package/Application/types.ts +47 -29
- package/Application/utils.tsx +61 -19
- package/Assets/icon_bank.json +1 -1
- package/Badge/BadgeDotAnimation.tsx +95 -0
- package/Badge/index.tsx +2 -1
- package/Badge/styles.ts +50 -6
- package/Button/index.tsx +7 -8
- package/Icon/index.tsx +1 -1
- package/Icon/types.ts +1 -2
- package/Image/index.tsx +0 -1
- package/Input/Input.tsx +51 -17
- package/Input/InputDropDown.tsx +42 -45
- package/Input/InputMoney.tsx +65 -6
- package/Input/InputOTP.tsx +14 -13
- package/Input/InputSearch.tsx +259 -146
- package/Input/InputTextArea.tsx +0 -1
- package/Input/TextTyping.tsx +113 -0
- package/Input/common.tsx +29 -10
- package/Input/index.tsx +84 -89
- package/Input/styles.ts +44 -7
- package/Input/utils.ts +1 -1
- package/Layout/Card.tsx +4 -3
- package/Layout/FloatingButton.tsx +3 -3
- package/Layout/GridSystem.tsx +1 -1
- package/Layout/ItemList.tsx +3 -2
- package/Layout/Screen.tsx +188 -102
- package/Layout/Section.tsx +4 -3
- package/Layout/styles.ts +0 -6
- package/Layout/types.ts +1 -1
- package/Layout/utils.ts +2 -2
- package/Loader/index.tsx +2 -0
- package/Pagination/PaginationScroll.tsx +2 -2
- package/Pagination/styles.ts +1 -1
- package/Popup/PopupNotify.tsx +7 -7
- package/Popup/PopupPromotion.tsx +1 -1
- package/Popup/types.ts +1 -1
- package/Tag/index.tsx +9 -2
- package/Tag/styles.ts +3 -2
- package/Tag/types.ts +12 -0
- package/Title/index.tsx +20 -7
- package/Title/styles.ts +4 -4
- package/code-scanner.js +141 -124
- package/index.ts +7 -0
- package/package.json +5 -4
- package/publish.sh +16 -21
- package/tsconfig.json +1 -1
package/Tag/styles.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {Radius, Spacing} from '../Consts';
|
|
3
|
+
import {scaleSize} from '../Text';
|
|
3
4
|
|
|
4
5
|
export default StyleSheet.create({
|
|
5
6
|
container: {
|
|
6
7
|
paddingHorizontal: Spacing.S,
|
|
7
8
|
borderRadius: Radius.S,
|
|
8
9
|
flexDirection: 'row',
|
|
9
|
-
height: 24,
|
|
10
|
+
height: scaleSize(24),
|
|
10
11
|
alignItems: 'center',
|
|
11
12
|
justifyContent: 'center',
|
|
12
13
|
},
|
|
13
14
|
mediumContainer: {
|
|
14
15
|
paddingHorizontal: Spacing.S,
|
|
15
16
|
borderRadius: Radius.S,
|
|
16
|
-
height: 18,
|
|
17
|
+
height: scaleSize(18),
|
|
17
18
|
alignItems: 'center',
|
|
18
19
|
flexDirection: 'row',
|
|
19
20
|
justifyContent: 'center',
|
package/Tag/types.ts
CHANGED
|
@@ -33,4 +33,16 @@ export type TagProps = {
|
|
|
33
33
|
* that can be applied to the Tag component.
|
|
34
34
|
*/
|
|
35
35
|
customColor?: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Overrides the text that's read by the screen reader when the user interacts with the element. By default, the
|
|
39
|
+
* label is constructed by traversing all the children and accumulating all the Text nodes separated by space.
|
|
40
|
+
*/
|
|
41
|
+
accessibilityLabelContainer?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Overrides the text that's read by the screen reader when the user interacts with the element. By default, the
|
|
45
|
+
* label is constructed by traversing all the children and accumulating all the Text nodes separated by space.
|
|
46
|
+
*/
|
|
47
|
+
accessibilityLabelText?: string;
|
|
36
48
|
};
|
package/Title/index.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, {FC, useContext, useState} from 'react';
|
|
2
2
|
import {Text as RNText, TouchableOpacity, View, ViewStyle} from 'react-native';
|
|
3
|
-
import styles from './styles';
|
|
4
3
|
import {Icon} from '../Icon';
|
|
5
4
|
import {scaleSize, Text} from '../Text';
|
|
6
5
|
import {ApplicationContext} from '../Application';
|
|
7
6
|
import {Badge} from '../Badge';
|
|
8
|
-
import {Typography} from '../Text/types';
|
|
9
|
-
import {TitleProps} from './types';
|
|
10
7
|
import {Colors} from '../Consts';
|
|
8
|
+
import styles from './styles';
|
|
9
|
+
import {TitleProps} from './types';
|
|
10
|
+
import {Typography} from '../Text/types';
|
|
11
11
|
|
|
12
12
|
const Title: FC<TitleProps> = ({
|
|
13
13
|
title = 'Title',
|
|
@@ -67,7 +67,9 @@ const Title: FC<TitleProps> = ({
|
|
|
67
67
|
<View style={styles.contentView}>
|
|
68
68
|
<View
|
|
69
69
|
onLayout={e => {
|
|
70
|
-
|
|
70
|
+
if (e.nativeEvent.layout.width !== contentWidth) {
|
|
71
|
+
setContentWidth(e.nativeEvent.layout.width);
|
|
72
|
+
}
|
|
71
73
|
}}
|
|
72
74
|
style={[styles.iconLeftView, flexStyle]}>
|
|
73
75
|
<RNText
|
|
@@ -75,14 +77,19 @@ const Title: FC<TitleProps> = ({
|
|
|
75
77
|
style={[
|
|
76
78
|
styleSheet[typography],
|
|
77
79
|
styles.title,
|
|
78
|
-
{
|
|
80
|
+
{
|
|
81
|
+
maxWidth:
|
|
82
|
+
contentWidth > 0 ? contentWidth - badgeWidth : undefined,
|
|
83
|
+
},
|
|
79
84
|
]}>
|
|
80
85
|
{title}
|
|
81
86
|
</RNText>
|
|
82
87
|
{badgeLabel && (
|
|
83
88
|
<View
|
|
84
89
|
onLayout={e => {
|
|
85
|
-
|
|
90
|
+
if (e.nativeEvent.layout.width !== badgeWidth) {
|
|
91
|
+
setBadgeWidth(e.nativeEvent.layout.width);
|
|
92
|
+
}
|
|
86
93
|
}}
|
|
87
94
|
style={{
|
|
88
95
|
alignItems: 'center',
|
|
@@ -133,8 +140,14 @@ const Title: FC<TitleProps> = ({
|
|
|
133
140
|
const renderActionRight = () => {
|
|
134
141
|
if (!showRightAction || showTrailingAction) return false;
|
|
135
142
|
|
|
143
|
+
const lineHeight = styleSheet[typography].lineHeight;
|
|
144
|
+
|
|
136
145
|
return (
|
|
137
|
-
<View
|
|
146
|
+
<View
|
|
147
|
+
style={{
|
|
148
|
+
height: lineHeight,
|
|
149
|
+
justifyContent: 'center',
|
|
150
|
+
}}>
|
|
138
151
|
{!buttonTitle ? (
|
|
139
152
|
<TouchableOpacity
|
|
140
153
|
onPress={onPressRightAction}
|
package/Title/styles.ts
CHANGED
|
@@ -46,16 +46,16 @@ export default StyleSheet.create({
|
|
|
46
46
|
marginRight: Spacing.S,
|
|
47
47
|
},
|
|
48
48
|
iconRight: {
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
49
|
+
width: 22,
|
|
50
|
+
height: 22,
|
|
51
51
|
borderRadius: Radius.M,
|
|
52
52
|
alignItems: 'center',
|
|
53
53
|
justifyContent: 'center',
|
|
54
54
|
marginLeft: Spacing.S,
|
|
55
55
|
},
|
|
56
56
|
iconLeft: {
|
|
57
|
-
width:
|
|
58
|
-
height:
|
|
57
|
+
width: 18,
|
|
58
|
+
height: 18,
|
|
59
59
|
borderRadius: Radius.M,
|
|
60
60
|
alignItems: 'center',
|
|
61
61
|
justifyContent: 'center',
|
package/code-scanner.js
CHANGED
|
@@ -2,142 +2,159 @@ const scanner = require('react-scanner');
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
|
|
5
|
-
const scan = async
|
|
6
|
-
|
|
5
|
+
const scan = async config => {
|
|
6
|
+
return await scanner.run(config);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
const calcSum =
|
|
10
|
-
|
|
9
|
+
const calcSum = array => {
|
|
10
|
+
return array.reduce((a, b) => a + b, 0);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
const calculateAdoptionRate = async (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
const calculateAdoptionRate = async (
|
|
14
|
+
branchName,
|
|
15
|
+
kitJsonPath,
|
|
16
|
+
miniappJsonPath,
|
|
17
|
+
reactNativeJsonPath,
|
|
18
|
+
fsJsonPath
|
|
19
|
+
) => {
|
|
20
|
+
const kitJson = require(kitJsonPath);
|
|
21
|
+
const miniAppJson = require(miniappJsonPath);
|
|
22
|
+
const reactNativeJson = require(reactNativeJsonPath);
|
|
23
|
+
const fsJson = require(fsJsonPath);
|
|
24
|
+
|
|
25
|
+
const numOfKitComponents = calcSum(Object.values(kitJson));
|
|
26
|
+
const numOfMiniAppComponents = calcSum(Object.values(miniAppJson));
|
|
27
|
+
const numOfReactNativeComponents = calcSum(Object.values(reactNativeJson));
|
|
28
|
+
const numOfFSComponents = calcSum(Object.values(fsJson));
|
|
29
|
+
|
|
30
|
+
const adoptionRate =
|
|
31
|
+
((numOfKitComponents + numOfReactNativeComponents + numOfFSComponents) /
|
|
32
|
+
numOfMiniAppComponents) *
|
|
33
|
+
100;
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
miniAppName: branchName,
|
|
37
|
+
numOfKitComponents: numOfKitComponents,
|
|
38
|
+
numOfMiniAppComponents: numOfMiniAppComponents,
|
|
39
|
+
numOfReactNativeComponents: numOfReactNativeComponents,
|
|
40
|
+
numOfFSComponents: numOfFSComponents,
|
|
41
|
+
adoptionRate: adoptionRate.toFixed(2) + '%',
|
|
42
|
+
};
|
|
34
43
|
};
|
|
35
44
|
|
|
36
|
-
function ensureFileExists(filePath
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
function ensureFileExists(filePath, defaultContent = {}) {
|
|
46
|
+
if (!fs.existsSync(filePath)) {
|
|
47
|
+
fs.mkdirSync(path.dirname(filePath), {recursive: true});
|
|
48
|
+
fs.writeFileSync(filePath, JSON.stringify(defaultContent, null, 2));
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
const sendMessage = ({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
numOfKitComponents,
|
|
54
|
+
numOfMiniAppComponents,
|
|
55
|
+
numOfFSComponents,
|
|
56
|
+
numOfReactNativeComponents,
|
|
57
|
+
adoptionRate,
|
|
58
|
+
miniAppName = '',
|
|
59
|
+
}) => {
|
|
60
|
+
const url =
|
|
61
|
+
'https://chat.googleapis.com/v1/spaces/AAAAL9P6G8M/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=fnwfYuH_u0KicBnKTSSm9S0qV6azJH5v6URm8HR7V2g';
|
|
62
|
+
|
|
63
|
+
const data = {
|
|
64
|
+
text: `MiniApp: ${miniAppName}\nNumber of kit's components: ${numOfKitComponents}\nNumber of miniapp's components: ${numOfMiniAppComponents}\nNumber of FS's components: ${numOfFSComponents}\nNumber of React Native's components: ${numOfReactNativeComponents}\nAdoption rate: ${adoptionRate}`,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
fetch(url, {
|
|
68
|
+
method: 'POST',
|
|
69
|
+
headers: {
|
|
70
|
+
'Content-Type': 'application/json',
|
|
71
|
+
},
|
|
72
|
+
body: JSON.stringify(data),
|
|
73
|
+
})
|
|
74
|
+
.then(response => response.json())
|
|
75
|
+
.then(data => {
|
|
76
|
+
console.log('Success:', data);
|
|
63
77
|
})
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.catch((error) => {
|
|
69
|
-
console.error('Error:', error);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
78
|
+
.catch(error => {
|
|
79
|
+
console.error('Error:', error);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
72
82
|
|
|
73
83
|
const main = async () => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
84
|
+
const rootPath = `${__dirname}/../../../`;
|
|
85
|
+
const app = path.join(`${__dirname}/../../../`, 'app.json');
|
|
86
|
+
const appJson = require(app);
|
|
87
|
+
const branchName = appJson.appId;
|
|
88
|
+
|
|
89
|
+
if (!branchName || !branchName.includes('vn.momo')) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const scanPath = path.join(rootPath, 'src');
|
|
94
|
+
const kitJsonPath = path.join(rootPath, './scan/kit.json');
|
|
95
|
+
const miniappJsonPath = path.join(rootPath, './scan/miniapp.json');
|
|
96
|
+
const reactNativeJsonPath = path.join(rootPath, './scan/RN.json');
|
|
97
|
+
const fsJsonPath = path.join(rootPath, './scan/verLib.json');
|
|
98
|
+
|
|
99
|
+
const allKitsReg = /@momo-kits/;
|
|
100
|
+
const fsReg =
|
|
101
|
+
/^(?:@fs-mobile-platform\/(components(\/.*)?|investment(\/.*)?|screens(\/.*)?|foundation(\/.*)?)|@miniapp-platform\/(components(\/.*)?|foundation(\/.*)?))$/;
|
|
102
|
+
const RNReg = /react-native|react-native-svg/;
|
|
103
|
+
|
|
104
|
+
const config1 = {
|
|
105
|
+
crawlFrom: scanPath,
|
|
106
|
+
includeSubComponents: true,
|
|
107
|
+
importedFrom: allKitsReg,
|
|
108
|
+
processors: [['count-components', {outputTo: kitJsonPath}]],
|
|
109
|
+
rootDir: process.cwd(),
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const config2 = {
|
|
113
|
+
crawlFrom: scanPath,
|
|
114
|
+
includeSubComponents: true,
|
|
115
|
+
processors: [['count-components', {outputTo: miniappJsonPath}]],
|
|
116
|
+
rootDir: process.cwd(),
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const config3 = {
|
|
120
|
+
crawlFrom: scanPath,
|
|
121
|
+
includeSubComponents: true,
|
|
122
|
+
importedFrom: RNReg,
|
|
123
|
+
processors: [['count-components', {outputTo: reactNativeJsonPath}]],
|
|
124
|
+
rootDir: process.cwd(),
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const config4 = {
|
|
128
|
+
crawlFrom: scanPath,
|
|
129
|
+
includeSubComponents: true,
|
|
130
|
+
importedFrom: fsReg,
|
|
131
|
+
processors: [['count-components', {outputTo: fsJsonPath}]],
|
|
132
|
+
rootDir: process.cwd(),
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
ensureFileExists(kitJsonPath, {});
|
|
137
|
+
ensureFileExists(miniappJsonPath, {});
|
|
138
|
+
ensureFileExists(reactNativeJsonPath, {});
|
|
139
|
+
ensureFileExists(fsJsonPath, {});
|
|
140
|
+
|
|
141
|
+
await scan(config1);
|
|
142
|
+
await scan(config2);
|
|
143
|
+
await scan(config3);
|
|
144
|
+
await scan(config4);
|
|
145
|
+
|
|
146
|
+
const result = await calculateAdoptionRate(
|
|
147
|
+
branchName,
|
|
148
|
+
kitJsonPath,
|
|
149
|
+
miniappJsonPath,
|
|
150
|
+
reactNativeJsonPath,
|
|
151
|
+
fsJsonPath
|
|
152
|
+
);
|
|
153
|
+
sendMessage(result);
|
|
154
|
+
console.log(result);
|
|
155
|
+
} catch (error) {
|
|
156
|
+
console.error('Error during scan or calculation:', error);
|
|
157
|
+
}
|
|
141
158
|
};
|
|
142
159
|
|
|
143
160
|
main();
|
package/index.ts
CHANGED
|
@@ -49,3 +49,10 @@ export * from './Title';
|
|
|
49
49
|
export * from './Title/types';
|
|
50
50
|
export * from './Badge';
|
|
51
51
|
export * from './Badge/types';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* export trick for keep old mini app working
|
|
55
|
+
* @deprecated
|
|
56
|
+
*/
|
|
57
|
+
export * from 'react-native-modalize';
|
|
58
|
+
export * from '@gorhom/bottom-sheet';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/foundation",
|
|
3
|
-
"version": "0.92.7-rc.
|
|
3
|
+
"version": "0.92.7-rc.22",
|
|
4
4
|
"description": "React Native Component Kits",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@react-navigation/core": "5.16.1",
|
|
19
19
|
"@react-navigation/native": "5.9.8",
|
|
20
20
|
"@react-navigation/routers": "5.7.4",
|
|
21
|
-
"lottie-react-native": "
|
|
21
|
+
"lottie-react-native": "git+https://gitlab.mservice.com.vn/momo-platform/momo-lottie-react-native.git",
|
|
22
22
|
"@react-navigation/stack": "https://gitlab.mservice.com.vn/momo-platform/react-navigation-stack.git"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
"react-test-renderer": "17.0.1",
|
|
40
40
|
"typescript": "^4.0.3",
|
|
41
41
|
"@momo-platform/versions": "4.1.11",
|
|
42
|
-
"react-scanner": "^1.1.0"
|
|
42
|
+
"react-scanner": "^1.1.0",
|
|
43
|
+
"@types/color": "3.0.6"
|
|
43
44
|
},
|
|
44
45
|
"author": "@momo-kits/foundation",
|
|
45
46
|
"license": "ISC"
|
|
46
|
-
}
|
|
47
|
+
}
|
package/publish.sh
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
rm -rf dist
|
|
3
|
-
mkdir dist
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
npm publish --tag
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#curl -X POST -H 'Content-Type: application/json' 'https://chat.googleapis.com/v1/spaces/AAAAbP8987c/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=UGSFRvk_oYb9uGsAgs31bVvMm6jDkmD8zihGm3eyaQA%3D&threadKey=JoaXTEYaNNkl' -d '{"text": "@momo-kits/core new version release: '*"$VERSION"*' https://www.npmjs.com/package/@momo-kits/foundation"}'
|
|
3
|
+
if [ "$1" == "stable" ]; then
|
|
4
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
5
|
+
npm version patch
|
|
6
|
+
npm publish --tag stable --access=public
|
|
7
|
+
elif [ "$1" == "latest" ]; then
|
|
8
|
+
npm version $(npm view @momo-kits/foundation@latest version)
|
|
9
|
+
npm version prerelease --preid=rc
|
|
10
|
+
npm publish --tag latest --access=public
|
|
11
|
+
else
|
|
12
|
+
npm version $(npm view @momo-kits/foundation@beta version)
|
|
13
|
+
npm version prerelease --preid=beta
|
|
14
|
+
npm publish --tag beta --access=public
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
PACKAGE_NAME=$(npm pkg get name)
|
|
18
|
+
NEW_PACKAGE_VERSION=$(npm pkg get version)
|