react-native-compressor 0.5.8 → 0.5.9

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
@@ -26,10 +26,12 @@
26
26
 
27
27
  ## Installation
28
28
 
29
- Using Yarn
29
+ ### React Native
30
+
31
+ #### For React Native<0.65
30
32
 
31
33
  ```sh
32
- yarn add react-native-compressor
34
+ yarn add react-native-compressor@0.5.9
33
35
  ```
34
36
 
35
37
  Using Npm
@@ -38,6 +40,21 @@ Using Npm
38
40
  npm install react-native-compressor --save
39
41
  ```
40
42
 
43
+ ### Managed Expo
44
+
45
+ ```
46
+ expo install react-native-compressor
47
+ ```
48
+
49
+ Add the Compressor plugin to your Expo config (`app.json`, `app.config.json` or `app.config.js`):
50
+
51
+ ```json
52
+ {
53
+ "name": "my app",
54
+ "plugins": ["react-native-compressor"]
55
+ }
56
+ ```
57
+
41
58
  ### Automatic linking (for React Native >= 0.60 only)
42
59
 
43
60
  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": "0.5.8",
3
+ "version": "0.5.9",
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);