@shoutem/ui 8.1.3-rc.3 → 8.1.3-rc.5

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.
@@ -0,0 +1 @@
1
+ export { default as ReactNativeHapticFeedback } from 'react-native-haptic-feedback';
@@ -0,0 +1,5 @@
1
+ const ReactNativeHapticFeedback = {
2
+ trigger: () => {},
3
+ };
4
+
5
+ export { ReactNativeHapticFeedback };
package/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import { setDefaultThemeStyle } from './init';
2
2
 
3
- export { default as ReactNativeHapticFeedback } from 'react-native-haptic-feedback';
4
-
5
3
  setDefaultThemeStyle();
6
4
 
7
5
  // Theme
@@ -56,6 +54,7 @@ export { NumberInput } from './components/NumberInput';
56
54
  export { Overlay } from './components/Overlay';
57
55
  export { PageIndicators } from './components/PageIndicators';
58
56
  export * from './components/ProgressRings';
57
+ export { ReactNativeHapticFeedback } from './components/RNHapticFeedback';
59
58
  export { Row } from './components/Row';
60
59
  export { Screen } from './components/Screen';
61
60
  export { ScrollView } from './components/ScrollView';
@@ -74,6 +73,8 @@ export { TouchableOpacity } from './components/TouchableOpacity';
74
73
  export { Video } from './components/Video';
75
74
  export { View } from './components/View';
76
75
  export { YearRangePicker } from './components/YearRangePicker';
76
+
77
+ // Hooks
77
78
  export * from './hooks';
78
79
 
79
80
  // Helpers
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "@shoutem/ui",
3
- "version": "8.1.3-rc.3",
3
+ "version": "8.1.3-rc.5",
4
4
  "description": "Styleable set of components for React Native applications",
5
- "type": "module",
6
5
  "scripts": {
7
6
  "lint": "eslint .",
8
7
  "lint-fix": "eslint . --fix",
9
- "preinstall": "node ./scripts/remove-mobile-only-dependencies",
10
8
  "postinstall": "node ./scripts/add-native-deps",
11
9
  "release": "npm publish --access public --tag latest",
12
10
  "release-rc": "npm publish --access public --tag rc",
@@ -88,9 +86,6 @@
88
86
  "react-native-svg",
89
87
  "react-native-webview"
90
88
  ],
91
- "mobileOnlyDependencies": [
92
- "react-native-haptic-feedback"
93
- ],
94
89
  "homepage": "http://shoutem.github.io/docs/ui-toolkit/introduction",
95
90
  "bugs": {
96
91
  "url": "https://github.com/shoutem/ui/issues"
@@ -1,4 +1,4 @@
1
- import fs from 'fs-extra';
1
+ const fs = require('fs-extra');
2
2
 
3
3
  const ROOT_PACKAGE_JSON_PATH = '../../../package.json';
4
4
  const UI_PACKAGE_JSON_PATH = './package.json';
@@ -1,46 +0,0 @@
1
- import fs from 'fs';
2
-
3
- const UI_PACKAGE_JSON_PATH = './package.json';
4
-
5
- function removeMobileOnlyDependencies() {
6
- try {
7
- const uiPackageJsonRawData = fs.readFileSync(UI_PACKAGE_JSON_PATH);
8
- const uiPackageJson = JSON.parse(uiPackageJsonRawData);
9
-
10
- const uiDependencies = { ...uiPackageJson.dependencies };
11
- const mobileOnlyDependencies = uiPackageJson.mobileOnlyDependencies;
12
-
13
- mobileOnlyDependencies.forEach(dep => delete uiDependencies[dep]);
14
-
15
- const newPackageJson = {
16
- ...uiPackageJson,
17
- dependencies: uiDependencies,
18
- };
19
-
20
- fs.writeFileSync(
21
- UI_PACKAGE_JSON_PATH,
22
- JSON.stringify(newPackageJson, null, 2),
23
- );
24
- // eslint-disable-next-line no-console
25
- console.log(
26
- '[@shoutem/ui] - removed mobile only dependencies, updated @shoutem/ui package.json',
27
- );
28
- } catch (e) {
29
- // eslint-disable-next-line no-console
30
- console.log(
31
- `[@shoutem/ui] - error removing mobile only dependencies\n${e.message}`,
32
- );
33
- }
34
- }
35
-
36
- const rootConfigJsonRawData = fs.readFileSync(UI_PACKAGE_JSON_PATH);
37
- const rootConfigJson = JSON.parse(rootConfigJsonRawData);
38
-
39
- if (rootConfigJson.platform === 'web') {
40
- // eslint-disable-next-line no-console
41
- console.log(
42
- '[@shoutem/ui] - removing mobile only dependencies from @shoutem/ui package.json',
43
- );
44
-
45
- removeMobileOnlyDependencies();
46
- }