expo-module-template 10.1.0 → 10.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/$CHANGELOG.md +11 -0
- package/$package.json +26 -0
- package/README.md +2 -12
- package/android/build.gradle +4 -4
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/{%= project.package %}/{%- project.name %}Module.kt +24 -0
- package/android/src/main/java/{%= project.package %}/{%- project.name %}View.kt +6 -0
- package/expo-module.config.json +2 -3
- package/ios/{%- project.name %}.podspec +32 -0
- package/ios/{%- project.name %}Module.swift +21 -0
- package/ios/{%- project.name %}View.swift +5 -0
- package/package.json +3 -6
- package/src/{%- project.name %}.ts +14 -0
- package/src/{%- project.name %}View.tsx +17 -0
- package/CHANGELOG.md +0 -57
- package/android/src/main/java/expo/modules/template/ModuleTemplateModule.kt +0 -25
- package/android/src/main/java/expo/modules/template/ModuleTemplateView.kt +0 -6
- package/build/ExpoModuleTemplate.d.ts +0 -2
- package/build/ExpoModuleTemplate.js +0 -3
- package/build/ExpoModuleTemplate.js.map +0 -1
- package/build/ExpoModuleTemplate.web.d.ts +0 -4
- package/build/ExpoModuleTemplate.web.js +0 -6
- package/build/ExpoModuleTemplate.web.js.map +0 -1
- package/build/ExpoModuleTemplateNativeView.d.ts +0 -6
- package/build/ExpoModuleTemplateNativeView.js +0 -4
- package/build/ExpoModuleTemplateNativeView.js.map +0 -1
- package/build/ExpoModuleTemplateNativeView.web.d.ts +0 -4
- package/build/ExpoModuleTemplateNativeView.web.js +0 -8
- package/build/ExpoModuleTemplateNativeView.web.js.map +0 -1
- package/build/ExpoModuleTemplateView.d.ts +0 -20
- package/build/ExpoModuleTemplateView.js +0 -18
- package/build/ExpoModuleTemplateView.js.map +0 -1
- package/build/ModuleTemplate.d.ts +0 -13
- package/build/ModuleTemplate.js +0 -16
- package/build/ModuleTemplate.js.map +0 -1
- package/build/ModuleTemplate.types.d.ts +0 -3
- package/build/ModuleTemplate.types.js +0 -2
- package/build/ModuleTemplate.types.js.map +0 -1
- package/ios/ExpoModuleTemplate.podspec +0 -21
- package/ios/ExpoModuleTemplateModule.swift +0 -21
- package/ios/ExpoModuleTemplateView.swift +0 -3
- package/src/ExpoModuleTemplate.ts +0 -3
- package/src/ExpoModuleTemplate.web.ts +0 -5
- package/src/ExpoModuleTemplateNativeView.ts +0 -11
- package/src/ExpoModuleTemplateNativeView.web.tsx +0 -8
- package/src/ExpoModuleTemplateView.tsx +0 -28
- package/src/ModuleTemplate.ts +0 -22
- package/src/ModuleTemplate.types.ts +0 -3
- package/src/__tests__/ModuleTemplate-test.ts +0 -7
package/$CHANGELOG.md
ADDED
package/$package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%- project.slug %>",
|
|
3
|
+
"version": "<%- project.version %>",
|
|
4
|
+
"description": "<%- project.description %>",
|
|
5
|
+
"main": "build/<%- project.name %>.js",
|
|
6
|
+
"types": "build/<%- project.name %>.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"lint": "eslint ."
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["react-native", "expo", "<%- project.slug %>", "<%- project.name %>"],
|
|
12
|
+
"repository": "<%- repo %>",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "<%- repo %>/issues"
|
|
15
|
+
},
|
|
16
|
+
"author": "<%- author %>",
|
|
17
|
+
"license": "<%- license %>",
|
|
18
|
+
"homepage": "<%- repo %>#readme",
|
|
19
|
+
"dependencies": {},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"expo-module-scripts": "^2.0.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"expo": "*"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/README.md
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# <%- project.slug %>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## API documentation
|
|
6
|
-
|
|
7
|
-
## Installation in managed Expo projects
|
|
8
|
-
|
|
9
|
-
## Installation in bare React Native projects
|
|
10
|
-
|
|
11
|
-
## Contributing
|
|
12
|
-
|
|
13
|
-
Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
|
|
3
|
+
<%- project.description %>
|
package/android/build.gradle
CHANGED
|
@@ -3,8 +3,8 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'kotlin-android-extensions'
|
|
4
4
|
apply plugin: 'maven'
|
|
5
5
|
|
|
6
|
-
group = '
|
|
7
|
-
version = '10.
|
|
6
|
+
group = '<%- project.package %>'
|
|
7
|
+
version = '10.2.0'
|
|
8
8
|
|
|
9
9
|
buildscript {
|
|
10
10
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
@@ -61,8 +61,8 @@ android {
|
|
|
61
61
|
defaultConfig {
|
|
62
62
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
63
63
|
targetSdkVersion safeExtGet("targetSdkVersion", 30)
|
|
64
|
-
versionCode
|
|
65
|
-
versionName "10.
|
|
64
|
+
versionCode 1
|
|
65
|
+
versionName "10.2.0"
|
|
66
66
|
}
|
|
67
67
|
lintOptions {
|
|
68
68
|
abortOnError false
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<manifest package="
|
|
1
|
+
<manifest package="<%- project.package %>">
|
|
2
2
|
</manifest>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
package <%- project.package %>
|
|
2
|
+
|
|
3
|
+
import expo.modules.kotlin.modules.Module
|
|
4
|
+
import expo.modules.kotlin.modules.ModuleDefinition
|
|
5
|
+
|
|
6
|
+
class <%- project.name %>Module : Module() {
|
|
7
|
+
override fun definition() = ModuleDefinition {
|
|
8
|
+
name("<%- project.name %>")
|
|
9
|
+
|
|
10
|
+
function("helloAsync") { options: Map<String, String> ->
|
|
11
|
+
println("Hello 👋")
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
viewManager {
|
|
15
|
+
view { context ->
|
|
16
|
+
<%- project.name %>View(context)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
prop("name") { view: <%- project.name %>View, prop: String ->
|
|
20
|
+
println(prop)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/expo-module.config.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "expo-module-template",
|
|
3
2
|
"platforms": ["ios", "android", "web"],
|
|
4
3
|
"ios": {
|
|
5
|
-
"modulesClassNames": ["
|
|
4
|
+
"modulesClassNames": ["<%- project.name %>Module"]
|
|
6
5
|
},
|
|
7
6
|
"android": {
|
|
8
|
-
"modulesClassNames": ["
|
|
7
|
+
"modulesClassNames": ["<%- project.package %>.<%- project.name %>Module"]
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = '<%- project.name %>'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
s.platform = :ios, '12.0'
|
|
14
|
+
s.swift_version = '5.4'
|
|
15
|
+
s.source = { git: '<%- repo %>' }
|
|
16
|
+
s.static_framework = true
|
|
17
|
+
|
|
18
|
+
s.dependency 'ExpoModulesCore'
|
|
19
|
+
|
|
20
|
+
# Swift/Objective-C compatibility
|
|
21
|
+
s.pod_target_xcconfig = {
|
|
22
|
+
'DEFINES_MODULE' => 'YES',
|
|
23
|
+
'SWIFT_COMPILATION_MODE' => 'wholemodule'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
|
|
27
|
+
s.source_files = "**/*.h"
|
|
28
|
+
s.vendored_frameworks = "#{s.name}.xcframework"
|
|
29
|
+
else
|
|
30
|
+
s.source_files = "**/*.{h,m,swift}"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
|
|
3
|
+
public class <%- project.name %>Module: Module {
|
|
4
|
+
public func definition() -> ModuleDefinition {
|
|
5
|
+
name("<%- project.name %>")
|
|
6
|
+
|
|
7
|
+
function("helloAsync") { (options: [String: String]) in
|
|
8
|
+
print("Hello 👋")
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
viewManager {
|
|
12
|
+
view {
|
|
13
|
+
<%- project.name %>View()
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
prop("name") { (view: <%- project.name %>View, prop: String) in
|
|
17
|
+
print(prop)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-module-template",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "ExpoModuleTemplate standalone module",
|
|
5
5
|
"main": "build/ModuleTemplate.js",
|
|
6
6
|
"types": "build/ModuleTemplate.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"lint": "eslint ."
|
|
10
|
-
},
|
|
7
|
+
"scripts": {},
|
|
11
8
|
"keywords": [
|
|
12
9
|
"react-native",
|
|
13
10
|
"expo",
|
|
@@ -31,5 +28,5 @@
|
|
|
31
28
|
"peerDependencies": {
|
|
32
29
|
"expo": "*"
|
|
33
30
|
},
|
|
34
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "c87080dbe1d7cefd66a9f959c090ff1a2d2ab26d"
|
|
35
32
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NativeModulesProxy } from 'expo-modules-core';
|
|
2
|
+
|
|
3
|
+
import <%- project.name %>View, { <%- project.name %>ViewProps } from './<%- project.name %>View'
|
|
4
|
+
|
|
5
|
+
const { <%- project.name %> } = NativeModulesProxy;
|
|
6
|
+
|
|
7
|
+
export async function helloAsync(options: Record<string, string>) {
|
|
8
|
+
return await <%- project.name %>.helloAsync(options);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
<%- project.name %>View,
|
|
13
|
+
<%- project.name %>ViewProps
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { requireNativeViewManager } from 'expo-modules-core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
export type <%- project.name %>ViewProps = {
|
|
5
|
+
name: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type <%- project.name %>ViewState = {}
|
|
9
|
+
|
|
10
|
+
const NativeView: React.ComponentType<<%- project.name %>ViewProps> =
|
|
11
|
+
requireNativeViewManager('<%- project.name %>');
|
|
12
|
+
|
|
13
|
+
export default class <%- project.name %>View extends React.Component<<%- project.name %>ViewProps, <%- project.name %>ViewState> {
|
|
14
|
+
render() {
|
|
15
|
+
return <NativeView name={this.props.name} />;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Unpublished
|
|
4
|
-
|
|
5
|
-
### 🛠 Breaking changes
|
|
6
|
-
|
|
7
|
-
### 🎉 New features
|
|
8
|
-
|
|
9
|
-
### 🐛 Bug fixes
|
|
10
|
-
|
|
11
|
-
### 💡 Others
|
|
12
|
-
|
|
13
|
-
## 10.1.0 — 2021-12-03
|
|
14
|
-
|
|
15
|
-
### 🐛 Bug fixes
|
|
16
|
-
|
|
17
|
-
- Add missing import in `NativeView` template file. ([#15363](https://github.com/expo/expo/pull/15363) by [@Simek](https://github.com/Simek))
|
|
18
|
-
|
|
19
|
-
## 10.0.0 — 2021-09-28
|
|
20
|
-
|
|
21
|
-
### 🛠 Breaking changes
|
|
22
|
-
|
|
23
|
-
- Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))
|
|
24
|
-
|
|
25
|
-
### 🐛 Bug fixes
|
|
26
|
-
|
|
27
|
-
- Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
|
|
28
|
-
|
|
29
|
-
## 9.1.0 — 2021-06-16
|
|
30
|
-
|
|
31
|
-
### 🐛 Bug fixes
|
|
32
|
-
|
|
33
|
-
- Enable kotlin in all modules. ([#12716](https://github.com/expo/expo/pull/12716) by [@wschurman](https://github.com/wschurman))
|
|
34
|
-
|
|
35
|
-
### 💡 Others
|
|
36
|
-
|
|
37
|
-
- Build Android code using Java 8 to fix Android instrumented test build error. ([#12939](https://github.com/expo/expo/pull/12939) by [@kudo](https://github.com/kudo))
|
|
38
|
-
|
|
39
|
-
## 9.0.1 — 2021-03-10
|
|
40
|
-
|
|
41
|
-
### 🐛 Bug fixes
|
|
42
|
-
|
|
43
|
-
- Remove peerDependencies and unimodulePeerDependencies from Expo modules. ([#11980](https://github.com/expo/expo/pull/11980) by [@brentvatne](https://github.com/brentvatne))
|
|
44
|
-
|
|
45
|
-
## 9.0.0 — 2021-01-15
|
|
46
|
-
|
|
47
|
-
### 🛠 Breaking changes
|
|
48
|
-
|
|
49
|
-
- Dropped support for iOS 10.0 ([#11344](https://github.com/expo/expo/pull/11344) by [@tsapeta](https://github.com/tsapeta))
|
|
50
|
-
|
|
51
|
-
## 8.5.0 — 2020-11-17
|
|
52
|
-
|
|
53
|
-
_This version does not introduce any user-facing changes._
|
|
54
|
-
|
|
55
|
-
## 8.4.0 — 2020-08-18
|
|
56
|
-
|
|
57
|
-
_This version does not introduce any user-facing changes._
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
package expo.modules.template
|
|
2
|
-
|
|
3
|
-
import expo.modules.kotlin.modules.Module
|
|
4
|
-
import expo.modules.kotlin.modules.ModuleDefinition
|
|
5
|
-
|
|
6
|
-
class ModuleTemplateModule : Module() {
|
|
7
|
-
override fun definition() = ModuleDefinition {
|
|
8
|
-
name("ExpoModuleTemplate")
|
|
9
|
-
|
|
10
|
-
function("someGreatMethodAsync") { options: Map<String, String> ->
|
|
11
|
-
println("Hello 👋")
|
|
12
|
-
null as Any?
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
viewManager {
|
|
16
|
-
view { context ->
|
|
17
|
-
ModuleTemplateView(context)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
prop("someGreatProp") { view: ModuleTemplateView, prop: Int ->
|
|
21
|
-
println(prop)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoModuleTemplate.js","sourceRoot":"","sources":["../src/ExpoModuleTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,eAAe,kBAAkB,CAAC,kBAAkB,CAAC","sourcesContent":["import { NativeModulesProxy } from 'expo-modules-core';\n\nexport default NativeModulesProxy.ExpoModuleTemplate;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoModuleTemplate.web.js","sourceRoot":"","sources":["../src/ExpoModuleTemplate.web.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,IAAI,IAAI;QACN,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAC","sourcesContent":["export default {\n get name(): string {\n return 'ExpoModuleTemplate';\n },\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoModuleTemplateNativeView.js","sourceRoot":"","sources":["../src/ExpoModuleTemplateNativeView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAO7D,MAAM,UAAU,GACd,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;AAEjD,eAAe,UAAU,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\n\ntype NativeViewProps = {\n someGreatProp: number;\n};\n\nconst NativeView: React.ComponentType<NativeViewProps> =\n requireNativeViewManager('ExpoModuleTemplate');\n\nexport default NativeView;\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
export default class ExpoModuleTemplateView extends React.Component {
|
|
4
|
-
render() {
|
|
5
|
-
return React.createElement(View, null);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=ExpoModuleTemplateNativeView.web.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoModuleTemplateNativeView.web.js","sourceRoot":"","sources":["../src/ExpoModuleTemplateNativeView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,KAAK,CAAC,SAAS;IACjE,MAAM;QACJ,OAAO,oBAAC,IAAI,OAAG,CAAC;IAClB,CAAC;CACF","sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\n\nexport default class ExpoModuleTemplateView extends React.Component {\n render() {\n return <View />;\n }\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ExpoModuleTemplateViewProps {
|
|
3
|
-
someGreatProp: number;
|
|
4
|
-
}
|
|
5
|
-
interface ExpoModuleTemplateViewState {
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Great view that would suit your needs!
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <ExpoModuleTemplateNativeView
|
|
13
|
-
* greatProp="great"
|
|
14
|
-
* />
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export default class ExpoModuleTemplateView extends React.Component<ExpoModuleTemplateViewProps, ExpoModuleTemplateViewState> {
|
|
18
|
-
render(): JSX.Element;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import NativeView from './ExpoModuleTemplateNativeView';
|
|
3
|
-
/**
|
|
4
|
-
* Great view that would suit your needs!
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <ExpoModuleTemplateNativeView
|
|
9
|
-
* greatProp="great"
|
|
10
|
-
* />
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export default class ExpoModuleTemplateView extends React.Component {
|
|
14
|
-
render() {
|
|
15
|
-
return React.createElement(NativeView, { someGreatProp: this.props.someGreatProp });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=ExpoModuleTemplateView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoModuleTemplateView.js","sourceRoot":"","sources":["../src/ExpoModuleTemplateView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAQxD;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,KAAK,CAAC,SAGzD;IACC,MAAM;QACJ,OAAO,oBAAC,UAAU,IAAC,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAAI,CAAC;IACjE,CAAC;CACF","sourcesContent":["import * as React from 'react';\n\nimport NativeView from './ExpoModuleTemplateNativeView';\n\nexport interface ExpoModuleTemplateViewProps {\n someGreatProp: number;\n}\n\ninterface ExpoModuleTemplateViewState {}\n\n/**\n * Great view that would suit your needs!\n *\n * @example\n * ```tsx\n * <ExpoModuleTemplateNativeView\n * greatProp=\"great\"\n * />\n * ```\n */\nexport default class ExpoModuleTemplateView extends React.Component<\n ExpoModuleTemplateViewProps,\n ExpoModuleTemplateViewState\n> {\n render() {\n return <NativeView someGreatProp={this.props.someGreatProp} />;\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SampleOptions } from './ModuleTemplate.types';
|
|
2
|
-
export { default as ExpoModuleTemplateView, ExpoModuleTemplateViewProps, } from './ExpoModuleTemplateView';
|
|
3
|
-
export * from './ModuleTemplate.types';
|
|
4
|
-
/**
|
|
5
|
-
* Great method that does a lot great stuff.
|
|
6
|
-
* @param options specifies what great stuff you really want.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const result = await someGreatMethodAsync({ someOption: 'awesome' });
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare function someGreatMethodAsync(options: SampleOptions): Promise<any>;
|
package/build/ModuleTemplate.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import ExpoModuleTemplate from './ExpoModuleTemplate';
|
|
2
|
-
export { default as ExpoModuleTemplateView, } from './ExpoModuleTemplateView';
|
|
3
|
-
export * from './ModuleTemplate.types';
|
|
4
|
-
/**
|
|
5
|
-
* Great method that does a lot great stuff.
|
|
6
|
-
* @param options specifies what great stuff you really want.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const result = await someGreatMethodAsync({ someOption: 'awesome' });
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export async function someGreatMethodAsync(options) {
|
|
14
|
-
return await ExpoModuleTemplate.someGreatMethodAsync(options);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=ModuleTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleTemplate.js","sourceRoot":"","sources":["../src/ModuleTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EACL,OAAO,IAAI,sBAAsB,GAElC,MAAM,0BAA0B,CAAC;AAElC,cAAc,wBAAwB,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAsB;IAC/D,OAAO,MAAM,kBAAkB,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import ExpoModuleTemplate from './ExpoModuleTemplate';\nimport { SampleOptions } from './ModuleTemplate.types';\n\nexport {\n default as ExpoModuleTemplateView,\n ExpoModuleTemplateViewProps,\n} from './ExpoModuleTemplateView';\n\nexport * from './ModuleTemplate.types';\n\n/**\n * Great method that does a lot great stuff.\n * @param options specifies what great stuff you really want.\n *\n * @example\n * ```typescript\n * const result = await someGreatMethodAsync({ someOption: 'awesome' });\n * ```\n */\nexport async function someGreatMethodAsync(options: SampleOptions) {\n return await ExpoModuleTemplate.someGreatMethodAsync(options);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleTemplate.types.js","sourceRoot":"","sources":["../src/ModuleTemplate.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface SampleOptions {\n someOption: string;\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = 'ExpoModuleTemplate'
|
|
7
|
-
s.version = package['version']
|
|
8
|
-
s.summary = package['description']
|
|
9
|
-
s.description = package['description']
|
|
10
|
-
s.license = package['license']
|
|
11
|
-
s.author = package['author']
|
|
12
|
-
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '12.0'
|
|
14
|
-
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
15
|
-
s.static_framework = true
|
|
16
|
-
s.source_files = '**/*.{h,m,swift}'
|
|
17
|
-
s.preserve_paths = '**/*.{h,m,swift}'
|
|
18
|
-
s.requires_arc = true
|
|
19
|
-
|
|
20
|
-
s.dependency 'ExpoModulesCore'
|
|
21
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import ExpoModulesCore
|
|
2
|
-
|
|
3
|
-
public class ExpoModuleTemplateModule: Module {
|
|
4
|
-
public func definition() -> ModuleDefinition {
|
|
5
|
-
name("ExpoModuleTemplate")
|
|
6
|
-
|
|
7
|
-
function("someGreatMethodAsync") { (options: [String: String]) in
|
|
8
|
-
print("Hello 👋")
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
viewManager {
|
|
12
|
-
view {
|
|
13
|
-
ExpoModuleTemplateView()
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
prop("someGreatProp") { (view: ExpoModuleTemplateView, prop: Int) in
|
|
17
|
-
print("prop")
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { requireNativeViewManager } from 'expo-modules-core';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
type NativeViewProps = {
|
|
5
|
-
someGreatProp: number;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const NativeView: React.ComponentType<NativeViewProps> =
|
|
9
|
-
requireNativeViewManager('ExpoModuleTemplate');
|
|
10
|
-
|
|
11
|
-
export default NativeView;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import NativeView from './ExpoModuleTemplateNativeView';
|
|
4
|
-
|
|
5
|
-
export interface ExpoModuleTemplateViewProps {
|
|
6
|
-
someGreatProp: number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ExpoModuleTemplateViewState {}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Great view that would suit your needs!
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <ExpoModuleTemplateNativeView
|
|
17
|
-
* greatProp="great"
|
|
18
|
-
* />
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export default class ExpoModuleTemplateView extends React.Component<
|
|
22
|
-
ExpoModuleTemplateViewProps,
|
|
23
|
-
ExpoModuleTemplateViewState
|
|
24
|
-
> {
|
|
25
|
-
render() {
|
|
26
|
-
return <NativeView someGreatProp={this.props.someGreatProp} />;
|
|
27
|
-
}
|
|
28
|
-
}
|
package/src/ModuleTemplate.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import ExpoModuleTemplate from './ExpoModuleTemplate';
|
|
2
|
-
import { SampleOptions } from './ModuleTemplate.types';
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
default as ExpoModuleTemplateView,
|
|
6
|
-
ExpoModuleTemplateViewProps,
|
|
7
|
-
} from './ExpoModuleTemplateView';
|
|
8
|
-
|
|
9
|
-
export * from './ModuleTemplate.types';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Great method that does a lot great stuff.
|
|
13
|
-
* @param options specifies what great stuff you really want.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* const result = await someGreatMethodAsync({ someOption: 'awesome' });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export async function someGreatMethodAsync(options: SampleOptions) {
|
|
21
|
-
return await ExpoModuleTemplate.someGreatMethodAsync(options);
|
|
22
|
-
}
|