create-eas-build-function 0.0.3 → 0.0.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-eas-build-function",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"bin": {
|
|
5
5
|
"create-eas-build-function": "./build/index.js"
|
|
6
6
|
},
|
|
@@ -24,14 +24,17 @@
|
|
|
24
24
|
"templates"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"prepack": "yarn run clean && yarn run build
|
|
27
|
+
"prepack": "yarn run clean && yarn run build",
|
|
28
28
|
"lint": "eslint .",
|
|
29
|
-
"test": "
|
|
30
|
-
"watch": "yarn run build -w",
|
|
31
|
-
"build": "ncc build ./src/index.ts -o build/",
|
|
32
|
-
"build
|
|
29
|
+
"test": "echo 'No tests yet.'",
|
|
30
|
+
"watch": "yarn run build:dev -w",
|
|
31
|
+
"build:dev": "ncc build ./src/index.ts -o build/",
|
|
32
|
+
"build": "ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register",
|
|
33
33
|
"clean": "rimraf ./build/"
|
|
34
34
|
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@expo/steps": "1.0.30"
|
|
37
|
+
},
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"@expo/package-manager": "^1.0.2",
|
|
37
40
|
"@jest/globals": "^29.6.2",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# My EAS Build function
|
|
2
|
+
|
|
3
|
+
This is an EAS Build function written in JavaScript. It can be used as a step in a [custom build](https://docs.expo.dev/preview/custom-build-config/).
|
|
4
|
+
|
|
5
|
+
## How to use it
|
|
6
|
+
|
|
7
|
+
1. Install dependencies: `npm install`.
|
|
8
|
+
2. Implement your function in `src/index.js`.
|
|
9
|
+
3. Install [`ncc`](https://github.com/vercel/ncc) if not yet installed: `npm install -g @vercel/ncc`.
|
|
10
|
+
4. Compile the function with `ncc` by running `npm run build`. Ensure that the `build` directory is not ignored by `.gitignore` / `.easignore`, it must be included in the [archive uploaded when running `eas build`](https://expo.fyi/eas-build-archive).
|
|
11
|
+
5. Use the function in a custom build YAML config. For example:
|
|
12
|
+
|
|
13
|
+
```yml
|
|
14
|
+
build:
|
|
15
|
+
name: Custom build
|
|
16
|
+
steps:
|
|
17
|
+
- run:
|
|
18
|
+
name: Hi!
|
|
19
|
+
command: echo "Hello! Let's run a custom function!"
|
|
20
|
+
- my_function:
|
|
21
|
+
id: my-function-call
|
|
22
|
+
- run:
|
|
23
|
+
name: Bye!
|
|
24
|
+
command: echo "Bye! The custom function has finished its job."
|
|
25
|
+
|
|
26
|
+
functions:
|
|
27
|
+
my_function:
|
|
28
|
+
name: my-function
|
|
29
|
+
path: ./my-function # The path is resolved relative to this config file.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Learn more
|
|
33
|
+
|
|
34
|
+
Refer to the [custom builds documentation](https://docs.expo.dev/preview/custom-build-config/).
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// This file was autogenerated by `create-eas-build-function` command.
|
|
2
|
+
// Go to README.md to learn more about how to write your own custom build functions.
|
|
3
|
+
|
|
1
4
|
function myFunction(ctx, { inputs, outputs, env }) {
|
|
2
5
|
ctx.logger.info('Hello from my JavaScript function!');
|
|
3
6
|
}
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
# My EAS Build function
|
|
2
|
+
|
|
3
|
+
This is an EAS Build function written in TypeScript. It can be used as a step in a [custom build](https://docs.expo.dev/preview/custom-build-config/).
|
|
4
|
+
|
|
5
|
+
## How to use it
|
|
6
|
+
|
|
7
|
+
1. Install dependencies: `npm install`.
|
|
8
|
+
2. Implement your function in `src/index.ts`.
|
|
9
|
+
3. Install [`ncc`](https://github.com/vercel/ncc) if not yet installed: `npm install -g @vercel/ncc`.
|
|
10
|
+
4. Compile the function with `ncc` by running `npm run build`. Ensure that the `build` directory is not ignored by `.gitignore` / `.easignore`, it must be included in the [archive uploaded when running `eas build`](https://expo.fyi/eas-build-archive).
|
|
11
|
+
5. Use the function in a custom build YAML config. For example:
|
|
12
|
+
|
|
13
|
+
```yml
|
|
14
|
+
build:
|
|
15
|
+
name: Custom build
|
|
16
|
+
steps:
|
|
17
|
+
- run:
|
|
18
|
+
name: Hi!
|
|
19
|
+
command: echo "Hello! Let's run a custom function!"
|
|
20
|
+
- my_function:
|
|
21
|
+
id: my-function-call
|
|
22
|
+
- run:
|
|
23
|
+
name: Bye!
|
|
24
|
+
command: echo "Bye! The custom function has finished its job."
|
|
25
|
+
|
|
26
|
+
functions:
|
|
27
|
+
my_function:
|
|
28
|
+
name: my-function
|
|
29
|
+
path: ./my-function # The path is resolved relative to this config file.
|
|
30
|
+
```
|
|
31
|
+
## Learn more
|
|
32
|
+
|
|
33
|
+
Refer to the [custom builds documentation](https://docs.expo.dev/preview/custom-build-config/).
|