create-eas-build-function 0.0.1

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 ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "create-eas-build-function",
3
+ "version": "0.0.1",
4
+ "bin": {
5
+ "create-eas-build-function": "./build/index.js"
6
+ },
7
+ "main": "build",
8
+ "description": "Create custom function modules for EAS Build's custom builds.",
9
+ "license": "BSD-3-Clause",
10
+ "keywords": [
11
+ "expo",
12
+ "react-native",
13
+ "react"
14
+ ],
15
+ "homepage": "https://docs.expo.dev",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/expo/eas-build.git",
19
+ "directory": "packages/create-eas-build-function"
20
+ },
21
+ "author": "Expo <support@expo.io>",
22
+ "files": [
23
+ "build",
24
+ "templates"
25
+ ],
26
+ "scripts": {
27
+ "prepack": "yarn run clean && yarn run build:prod",
28
+ "lint": "eslint .",
29
+ "test": "jest",
30
+ "watch": "yarn run build -w",
31
+ "build": "ncc build ./src/index.ts -o build/",
32
+ "build:prod": "ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register",
33
+ "clean": "rimraf ./build/"
34
+ },
35
+ "devDependencies": {
36
+ "@expo/package-manager": "^1.0.2",
37
+ "@jest/globals": "^29.6.2",
38
+ "@types/jest": "^29.5.3",
39
+ "@types/node": "^18.11.18",
40
+ "@types/prompts": "^2.4.4",
41
+ "chalk": "4.1.2",
42
+ "ora": "^6.3.1",
43
+ "prompts": "^2.4.2",
44
+ "ts-node": "^10.9.1",
45
+ "typescript": "^5.1.6",
46
+ "update-check": "^1.5.4"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "volta": {
52
+ "node": "18.13.0",
53
+ "yarn": "1.22.19"
54
+ },
55
+ "dependencies": {
56
+ "fs-extra": "^11.1.1"
57
+ }
58
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "presets": [
3
+ [
4
+ "@babel/preset-env",
5
+ {
6
+ "targets": {
7
+ "node": "current"
8
+ },
9
+ "modules": "commonjs"
10
+ }
11
+ ]
12
+ ]
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "custom-js-function",
3
+ "version": "1.0.0",
4
+ "main": "./build/index.js",
5
+ "type": "commonjs",
6
+ "devDependencies": {
7
+ "@babel/cli": "^7.22.9",
8
+ "@babel/core": "^7.22.9",
9
+ "@babel/preset-env": "^7.22.9"
10
+ },
11
+ "scripts": {
12
+ "babel": "babel src --out-dir babel",
13
+ "build": "yarn babel && ncc build ./babel/index.js -o build/ --minify --no-cache --no-source-map-register"
14
+ }
15
+ }
@@ -0,0 +1,5 @@
1
+ function myFunction(ctx, { inputs, outputs, env }) {
2
+ ctx.logger.info('Hello from my JavaScript function!');
3
+ }
4
+
5
+ export default myFunction;
@@ -0,0 +1 @@
1
+ TODO
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "custom-ts-function",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "./build/index.js",
6
+ "type": "commonjs",
7
+ "scripts": {
8
+ "build": "ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "devDependencies": {
13
+ "@types/node": "^18.11.18",
14
+ "typescript": "^5.1.6",
15
+ "@expo/steps": "^1.0.30"
16
+ }
17
+ }
@@ -0,0 +1,28 @@
1
+ import { BuildStepContext } from '@expo/steps';
2
+
3
+ // interface FunctionInputs {
4
+ // // specify the type of the inputs value and whether they are required here
5
+ // // example: name: BuildStepInput<BuildStepInputValueTypeName.STRING, true>;
6
+ // }
7
+
8
+ // interface FunctionOutputs {
9
+ // // specify the function outputs and whether they are required here
10
+ // // example: name: BuildStepOutput<true>;
11
+ // }
12
+
13
+ async function myFunction(
14
+ ctx: BuildStepContext
15
+ // {
16
+ // inputs,
17
+ // outputs,
18
+ // env,
19
+ // }: {
20
+ // inputs: FunctionInputs;
21
+ // outputs: FunctionOutputs;
22
+ // env: BuildStepEnv;
23
+ // }
24
+ ): Promise<void> {
25
+ ctx.logger.info('Hello from my TypeScript function!');
26
+ }
27
+
28
+ export default myFunction;
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "commonjs",
5
+ "sourceMap": true,
6
+ "inlineSources": true,
7
+ "strict": true,
8
+ "noUnusedLocals": true,
9
+ "noUnusedParameters": true,
10
+ "noImplicitReturns": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "noEmit": false,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "outDir": "build",
17
+ "resolveJsonModule": true,
18
+ "allowSyntheticDefaultImports": true,
19
+ "moduleResolution": "node",
20
+ "rootDir": "src",
21
+ "declaration": false,
22
+ "composite": false
23
+ },
24
+ "include": ["src/**/*.ts"],
25
+ "exclude": ["**/__mocks__/*", "**/__tests__/*"]
26
+ }