expo-module-template 10.7.0 → 10.7.3
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/$package.json +8 -3
- package/example/App.tsx +20 -0
- package/example/babel.config.js +19 -0
- package/example/metro.config.js +14 -0
- package/example/tsconfig.json +10 -0
- package/example/webpack.config.js +20 -0
- package/package.json +2 -2
package/$package.json
CHANGED
|
@@ -13,7 +13,12 @@
|
|
|
13
13
|
"prepublishOnly": "expo-module prepublishOnly",
|
|
14
14
|
"expo-module": "expo-module"
|
|
15
15
|
},
|
|
16
|
-
"keywords": [
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react-native",
|
|
18
|
+
"expo",
|
|
19
|
+
"<%- project.slug %>",
|
|
20
|
+
"<%- project.name %>"
|
|
21
|
+
],
|
|
17
22
|
"repository": "<%- repo %>",
|
|
18
23
|
"bugs": {
|
|
19
24
|
"url": "<%- repo %>/issues"
|
|
@@ -23,8 +28,8 @@
|
|
|
23
28
|
"homepage": "<%- repo %>#readme",
|
|
24
29
|
"dependencies": {},
|
|
25
30
|
"devDependencies": {
|
|
26
|
-
"expo-module-scripts": "^2.
|
|
27
|
-
"expo-modules-core": "^0.
|
|
31
|
+
"expo-module-scripts": "^2.1.1",
|
|
32
|
+
"expo-modules-core": "^0.11.4"
|
|
28
33
|
},
|
|
29
34
|
"peerDependencies": {
|
|
30
35
|
"expo": "*",
|
package/example/App.tsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import * as <%- project.name %> from '<%- project.slug %>';
|
|
4
|
+
|
|
5
|
+
export default function App() {
|
|
6
|
+
return (
|
|
7
|
+
<View style={styles.container}>
|
|
8
|
+
<Text>{<%- project.name %>.hello()}</Text>
|
|
9
|
+
</View>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styles = StyleSheet.create({
|
|
14
|
+
container: {
|
|
15
|
+
flex: 1,
|
|
16
|
+
backgroundColor: '#fff',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
module.exports = function (api) {
|
|
3
|
+
api.cache(true);
|
|
4
|
+
return {
|
|
5
|
+
presets: ['babel-preset-expo'],
|
|
6
|
+
plugins: [
|
|
7
|
+
[
|
|
8
|
+
'module-resolver',
|
|
9
|
+
{
|
|
10
|
+
extensions: ['.tsx', '.ts', '.js', '.json'],
|
|
11
|
+
alias: {
|
|
12
|
+
// For development, we want to alias the library to the source
|
|
13
|
+
'<%- project.slug %>': path.join(__dirname, '..', 'src', '<%- project.name %>.ts'),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
2
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const config = getDefaultConfig(__dirname);
|
|
6
|
+
|
|
7
|
+
config.resolver.nodeModulesPaths = [
|
|
8
|
+
path.resolve(__dirname, './node_modules'),
|
|
9
|
+
path.resolve(__dirname, '../node_modules'),
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
config.watchFolders = [path.resolve(__dirname, '..')];
|
|
13
|
+
|
|
14
|
+
module.exports = config;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const createConfigAsync = require('@expo/webpack-config');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
module.exports = async (env, argv) => {
|
|
5
|
+
const config = await createConfigAsync(
|
|
6
|
+
{
|
|
7
|
+
...env,
|
|
8
|
+
babel: {
|
|
9
|
+
dangerouslyAddModulePathsToTranspile: ['<%- project.slug %>'],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argv
|
|
13
|
+
);
|
|
14
|
+
config.resolve.modules = [
|
|
15
|
+
path.resolve(__dirname, './node_modules'),
|
|
16
|
+
path.resolve(__dirname, '../node_modules'),
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
return config;
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-module-template",
|
|
3
|
-
"version": "10.7.
|
|
3
|
+
"version": "10.7.3",
|
|
4
4
|
"description": "ExpoModuleTemplate standalone module",
|
|
5
5
|
"main": "build/ModuleTemplate.js",
|
|
6
6
|
"types": "build/ModuleTemplate.d.ts",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"dependencies": {},
|
|
25
25
|
"devDependencies": {},
|
|
26
26
|
"peerDependencies": {},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "f2136cdc98ea6595298d01900861d649bcc6cae1"
|
|
28
28
|
}
|