react-native-compressor 1.1.1 → 1.2.0

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/README.md CHANGED
@@ -28,10 +28,12 @@ If you find this package useful hit the star 🌟
28
28
 
29
29
  ## Installation
30
30
 
31
- #### For React Native 0.64 or lower
31
+ ### React Native
32
+
33
+ #### For React Native<0.65
32
34
 
33
35
  ```sh
34
- yarn add react-native-compressor@0.5.6
36
+ yarn add react-native-compressor@0.5.9
35
37
  ```
36
38
 
37
39
  #### For React Native 0.65 or greater
@@ -40,6 +42,21 @@ yarn add react-native-compressor@0.5.6
40
42
  yarn add react-native-compressor
41
43
  ```
42
44
 
45
+ ### Managed Expo
46
+
47
+ ```
48
+ expo install react-native-compressor
49
+ ```
50
+
51
+ Add the Compressor plugin to your Expo config (`app.json`, `app.config.json` or `app.config.js`):
52
+
53
+ ```json
54
+ {
55
+ "name": "my app",
56
+ "plugins": ["react-native-compressor"]
57
+ }
58
+ ```
59
+
43
60
  ### Automatic linking (for React Native >= 0.60 only)
44
61
 
45
62
  Automatic linking is supported for both `Android` and `IOS`
package/app.plugin.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./lib/commonjs/expo-plugin/compressor');
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _configPlugins = require("@expo/config-plugins");
9
+
10
+ const pkg = require('../../../package.json');
11
+
12
+ const withCompressor = config => config;
13
+
14
+ var _default = (0, _configPlugins.createRunOncePlugin)(withCompressor, pkg.name, pkg.version);
15
+
16
+ exports.default = _default;
17
+ //# sourceMappingURL=compressor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["compressor.ts"],"names":["pkg","require","withCompressor","config","name","version"],"mappings":";;;;;;;AAAA;;AACA,MAAMA,GAAG,GAAGC,OAAO,CAAC,uBAAD,CAAnB;;AAIA,MAAMC,cAAmC,GAAIC,MAAD,IAAYA,MAAxD;;eAEe,wCAAoBD,cAApB,EAAoCF,GAAG,CAACI,IAAxC,EAA8CJ,GAAG,CAACK,OAAlD,C","sourcesContent":["import { ConfigPlugin, createRunOncePlugin } from '@expo/config-plugins';\nconst pkg = require('../../../package.json');\n\ntype Props = {};\n\nconst withCompressor: ConfigPlugin<Props> = (config) => config;\n\nexport default createRunOncePlugin(withCompressor, pkg.name, pkg.version);\n"]}
@@ -0,0 +1,8 @@
1
+ import { createRunOncePlugin } from '@expo/config-plugins';
2
+
3
+ const pkg = require('../../../package.json');
4
+
5
+ const withCompressor = config => config;
6
+
7
+ export default createRunOncePlugin(withCompressor, pkg.name, pkg.version);
8
+ //# sourceMappingURL=compressor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["compressor.ts"],"names":["createRunOncePlugin","pkg","require","withCompressor","config","name","version"],"mappings":"AAAA,SAAuBA,mBAAvB,QAAkD,sBAAlD;;AACA,MAAMC,GAAG,GAAGC,OAAO,CAAC,uBAAD,CAAnB;;AAIA,MAAMC,cAAmC,GAAIC,MAAD,IAAYA,MAAxD;;AAEA,eAAeJ,mBAAmB,CAACG,cAAD,EAAiBF,GAAG,CAACI,IAArB,EAA2BJ,GAAG,CAACK,OAA/B,CAAlC","sourcesContent":["import { ConfigPlugin, createRunOncePlugin } from '@expo/config-plugins';\nconst pkg = require('../../../package.json');\n\ntype Props = {};\n\nconst withCompressor: ConfigPlugin<Props> = (config) => config;\n\nexport default createRunOncePlugin(withCompressor, pkg.name, pkg.version);\n"]}
@@ -0,0 +1,4 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ declare type Props = {};
3
+ declare const _default: ConfigPlugin<Props>;
4
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-compressor",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "This library compress image, video and audio",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -13,6 +13,7 @@
13
13
  "android",
14
14
  "ios",
15
15
  "cpp",
16
+ "app.plugin.js",
16
17
  "react-native-compressor.podspec",
17
18
  "!lib/typescript/example",
18
19
  "!android/build",
@@ -59,6 +60,7 @@
59
60
  },
60
61
  "devDependencies": {
61
62
  "@commitlint/config-conventional": "^11.0.0",
63
+ "@expo/config-plugins": "^4.0.14",
62
64
  "@react-native-community/eslint-config": "^2.0.0",
63
65
  "@release-it/conventional-changelog": "^2.0.0",
64
66
  "@types/jest": "^26.0.0",
@@ -0,0 +1,8 @@
1
+ import { ConfigPlugin, createRunOncePlugin } from '@expo/config-plugins';
2
+ const pkg = require('../../../package.json');
3
+
4
+ type Props = {};
5
+
6
+ const withCompressor: ConfigPlugin<Props> = (config) => config;
7
+
8
+ export default createRunOncePlugin(withCompressor, pkg.name, pkg.version);