@nrwl/expo 13.7.0-beta.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.
Files changed (217) hide show
  1. package/README.md +187 -0
  2. package/collection.json +0 -0
  3. package/executors.json +116 -0
  4. package/generators.json +61 -0
  5. package/index.d.ts +3 -0
  6. package/index.js +10 -0
  7. package/index.js.map +1 -0
  8. package/jest.config.js +12 -0
  9. package/package.json +50 -0
  10. package/plugins/jest/svg-mock.d.ts +0 -0
  11. package/plugins/jest/svg-mock.js +4 -0
  12. package/plugins/jest/svg-mock.js.map +1 -0
  13. package/plugins/metro-resolver.d.ts +1 -0
  14. package/plugins/metro-resolver.js +142 -0
  15. package/plugins/metro-resolver.js.map +1 -0
  16. package/plugins/with-nx-metro.d.ts +6 -0
  17. package/plugins/with-nx-metro.js +26 -0
  18. package/plugins/with-nx-metro.js.map +1 -0
  19. package/project.json +99 -0
  20. package/src/executors/build-android/build-android.impl.d.ts +6 -0
  21. package/src/executors/build-android/build-android.impl.js +66 -0
  22. package/src/executors/build-android/build-android.impl.js.map +1 -0
  23. package/src/executors/build-android/compat.d.ts +2 -0
  24. package/src/executors/build-android/compat.js +6 -0
  25. package/src/executors/build-android/compat.js.map +1 -0
  26. package/src/executors/build-android/schema.d.ts +13 -0
  27. package/src/executors/build-android/schema.json +54 -0
  28. package/src/executors/build-ios/build-ios.impl.d.ts +6 -0
  29. package/src/executors/build-ios/build-ios.impl.js +66 -0
  30. package/src/executors/build-ios/build-ios.impl.js.map +1 -0
  31. package/src/executors/build-ios/compat.d.ts +2 -0
  32. package/src/executors/build-ios/compat.js +6 -0
  33. package/src/executors/build-ios/compat.js.map +1 -0
  34. package/src/executors/build-ios/schema.d.ts +23 -0
  35. package/src/executors/build-ios/schema.json +91 -0
  36. package/src/executors/build-status/build-status.impl.d.ts +6 -0
  37. package/src/executors/build-status/build-status.impl.js +59 -0
  38. package/src/executors/build-status/build-status.impl.js.map +1 -0
  39. package/src/executors/build-status/compat.d.ts +2 -0
  40. package/src/executors/build-status/compat.js +6 -0
  41. package/src/executors/build-status/compat.js.map +1 -0
  42. package/src/executors/build-status/schema.d.ts +4 -0
  43. package/src/executors/build-status/schema.json +15 -0
  44. package/src/executors/build-web/build-web.impl.d.ts +6 -0
  45. package/src/executors/build-web/build-web.impl.js +59 -0
  46. package/src/executors/build-web/build-web.impl.js.map +1 -0
  47. package/src/executors/build-web/compat.d.ts +2 -0
  48. package/src/executors/build-web/compat.js +6 -0
  49. package/src/executors/build-web/compat.js.map +1 -0
  50. package/src/executors/build-web/schema.d.ts +6 -0
  51. package/src/executors/build-web/schema.json +24 -0
  52. package/src/executors/ensure-symlink/compat.d.ts +2 -0
  53. package/src/executors/ensure-symlink/compat.js +6 -0
  54. package/src/executors/ensure-symlink/compat.js.map +1 -0
  55. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
  56. package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
  57. package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
  58. package/src/executors/ensure-symlink/schema.json +9 -0
  59. package/src/executors/publish/compat.d.ts +2 -0
  60. package/src/executors/publish/compat.js +6 -0
  61. package/src/executors/publish/compat.js.map +1 -0
  62. package/src/executors/publish/publish.impl.d.ts +6 -0
  63. package/src/executors/publish/publish.impl.js +72 -0
  64. package/src/executors/publish/publish.impl.js.map +1 -0
  65. package/src/executors/publish/schema.d.ts +10 -0
  66. package/src/executors/publish/schema.json +42 -0
  67. package/src/executors/publish-set/compat.d.ts +2 -0
  68. package/src/executors/publish-set/compat.js +6 -0
  69. package/src/executors/publish-set/compat.js.map +1 -0
  70. package/src/executors/publish-set/publish-set.impl.d.ts +6 -0
  71. package/src/executors/publish-set/publish-set.impl.js +61 -0
  72. package/src/executors/publish-set/publish-set.impl.js.map +1 -0
  73. package/src/executors/publish-set/schema.d.ts +6 -0
  74. package/src/executors/publish-set/schema.json +19 -0
  75. package/src/executors/rollback/compat.d.ts +2 -0
  76. package/src/executors/rollback/compat.js +6 -0
  77. package/src/executors/rollback/compat.js.map +1 -0
  78. package/src/executors/rollback/rollback.impl.d.ts +6 -0
  79. package/src/executors/rollback/rollback.impl.js +61 -0
  80. package/src/executors/rollback/rollback.impl.js.map +1 -0
  81. package/src/executors/rollback/schema.d.ts +6 -0
  82. package/src/executors/rollback/schema.json +23 -0
  83. package/src/executors/run/compat.d.ts +2 -0
  84. package/src/executors/run/compat.js +6 -0
  85. package/src/executors/run/compat.js.map +1 -0
  86. package/src/executors/run/run.impl.d.ts +6 -0
  87. package/src/executors/run/run.impl.js +87 -0
  88. package/src/executors/run/run.impl.js.map +1 -0
  89. package/src/executors/run/schema.d.ts +11 -0
  90. package/src/executors/run/schema.json +51 -0
  91. package/src/executors/start/compat.d.ts +2 -0
  92. package/src/executors/start/compat.js +6 -0
  93. package/src/executors/start/compat.js.map +1 -0
  94. package/src/executors/start/schema.d.ts +22 -0
  95. package/src/executors/start/schema.json +85 -0
  96. package/src/executors/start/start.impl.d.ts +7 -0
  97. package/src/executors/start/start.impl.js +77 -0
  98. package/src/executors/start/start.impl.js.map +1 -0
  99. package/src/executors/sync-deps/compat.d.ts +2 -0
  100. package/src/executors/sync-deps/compat.js +6 -0
  101. package/src/executors/sync-deps/compat.js.map +1 -0
  102. package/src/executors/sync-deps/schema.d.ts +3 -0
  103. package/src/executors/sync-deps/schema.json +14 -0
  104. package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
  105. package/src/executors/sync-deps/sync-deps.impl.js +58 -0
  106. package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
  107. package/src/generators/application/application.d.ts +5 -0
  108. package/src/generators/application/application.js +34 -0
  109. package/src/generators/application/application.js.map +1 -0
  110. package/src/generators/application/files/.babelrc.js.template +6 -0
  111. package/src/generators/application/files/app.json.template +32 -0
  112. package/src/generators/application/files/assets/adaptive-icon.png +0 -0
  113. package/src/generators/application/files/assets/favicon.png +0 -0
  114. package/src/generators/application/files/assets/icon.png +0 -0
  115. package/src/generators/application/files/assets/logo.png +0 -0
  116. package/src/generators/application/files/assets/splash.png +0 -0
  117. package/src/generators/application/files/assets/star.svg +11 -0
  118. package/src/generators/application/files/eas.js.template +1 -0
  119. package/src/generators/application/files/eas.json.template +18 -0
  120. package/src/generators/application/files/index.js.template +9 -0
  121. package/src/generators/application/files/metro.config.js.template +21 -0
  122. package/src/generators/application/files/package.json.template +25 -0
  123. package/src/generators/application/files/src/app/App.spec.tsx.template +9 -0
  124. package/src/generators/application/files/src/app/App.tsx.template +486 -0
  125. package/src/generators/application/files/src/app/icons/blog.svg +1 -0
  126. package/src/generators/application/files/src/app/icons/book.svg +1 -0
  127. package/src/generators/application/files/src/app/icons/checkmark.svg +1 -0
  128. package/src/generators/application/files/src/app/icons/chevron-right.svg +1 -0
  129. package/src/generators/application/files/src/app/icons/courses.svg +1 -0
  130. package/src/generators/application/files/src/app/icons/github.svg +1 -0
  131. package/src/generators/application/files/src/app/icons/heart.svg +1 -0
  132. package/src/generators/application/files/src/app/icons/logo.png +0 -0
  133. package/src/generators/application/files/src/app/icons/nx-cloud.svg +1 -0
  134. package/src/generators/application/files/src/app/icons/pointer.svg +1 -0
  135. package/src/generators/application/files/src/app/icons/terminal.svg +1 -0
  136. package/src/generators/application/files/src/app/icons/vscode.svg +1 -0
  137. package/src/generators/application/files/src/app/icons/youtube.svg +1 -0
  138. package/src/generators/application/files/test-setup.ts.template +1 -0
  139. package/src/generators/application/files/tsconfig.app.json.template +9 -0
  140. package/src/generators/application/files/tsconfig.json.template +25 -0
  141. package/src/generators/application/lib/add-detox.d.ts +3 -0
  142. package/src/generators/application/lib/add-detox.js +16 -0
  143. package/src/generators/application/lib/add-detox.js.map +1 -0
  144. package/src/generators/application/lib/add-project.d.ts +3 -0
  145. package/src/generators/application/lib/add-project.js +92 -0
  146. package/src/generators/application/lib/add-project.js.map +1 -0
  147. package/src/generators/application/lib/create-application-files.d.ts +3 -0
  148. package/src/generators/application/lib/create-application-files.js +24 -0
  149. package/src/generators/application/lib/create-application-files.js.map +1 -0
  150. package/src/generators/application/lib/normalize-options.d.ts +9 -0
  151. package/src/generators/application/lib/normalize-options.js +28 -0
  152. package/src/generators/application/lib/normalize-options.js.map +1 -0
  153. package/src/generators/application/schema.d.ts +17 -0
  154. package/src/generators/application/schema.json +76 -0
  155. package/src/generators/component/component.d.ts +5 -0
  156. package/src/generators/component/component.js +51 -0
  157. package/src/generators/component/component.js.map +1 -0
  158. package/src/generators/component/files/__fileName__.spec.tsx.template +11 -0
  159. package/src/generators/component/files/__fileName__.tsx.template +32 -0
  160. package/src/generators/component/lib/add-import.d.ts +3 -0
  161. package/src/generators/component/lib/add-import.js +30 -0
  162. package/src/generators/component/lib/add-import.js.map +1 -0
  163. package/src/generators/component/lib/normalize-options.d.ts +8 -0
  164. package/src/generators/component/lib/normalize-options.js +58 -0
  165. package/src/generators/component/lib/normalize-options.js.map +1 -0
  166. package/src/generators/component/schema.d.ts +15 -0
  167. package/src/generators/component/schema.json +82 -0
  168. package/src/generators/init/init.d.ts +6 -0
  169. package/src/generators/init/init.js +70 -0
  170. package/src/generators/init/init.js.map +1 -0
  171. package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
  172. package/src/generators/init/lib/add-git-ignore-entry.js +19 -0
  173. package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
  174. package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
  175. package/src/generators/init/lib/gitignore-entries.js +18 -0
  176. package/src/generators/init/lib/gitignore-entries.js.map +1 -0
  177. package/src/generators/init/lib/init-root-babel-config.d.ts +2 -0
  178. package/src/generators/init/lib/init-root-babel-config.js +14 -0
  179. package/src/generators/init/lib/init-root-babel-config.js.map +1 -0
  180. package/src/generators/init/schema.d.ts +5 -0
  181. package/src/generators/init/schema.json +27 -0
  182. package/src/generators/library/files/lib/README.md +7 -0
  183. package/src/generators/library/files/lib/package.json.template +5 -0
  184. package/src/generators/library/files/lib/src/index.ts.template +0 -0
  185. package/src/generators/library/files/lib/test-setup.ts.template +1 -0
  186. package/src/generators/library/files/lib/tsconfig.json.template +16 -0
  187. package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
  188. package/src/generators/library/lib/normalize-options.d.ts +12 -0
  189. package/src/generators/library/lib/normalize-options.js +27 -0
  190. package/src/generators/library/lib/normalize-options.js.map +1 -0
  191. package/src/generators/library/library.d.ts +5 -0
  192. package/src/generators/library/library.js +114 -0
  193. package/src/generators/library/library.js.map +1 -0
  194. package/src/generators/library/schema.d.ts +22 -0
  195. package/src/generators/library/schema.json +97 -0
  196. package/src/utils/add-jest.d.ts +2 -0
  197. package/src/utils/add-jest.js +44 -0
  198. package/src/utils/add-jest.js.map +1 -0
  199. package/src/utils/add-linting.d.ts +3 -0
  200. package/src/utils/add-linting.js +42 -0
  201. package/src/utils/add-linting.js.map +1 -0
  202. package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
  203. package/src/utils/ensure-node-modules-symlink.js +29 -0
  204. package/src/utils/ensure-node-modules-symlink.js.map +1 -0
  205. package/src/utils/find-all-npm-dependencies.d.ts +2 -0
  206. package/src/utils/find-all-npm-dependencies.js +26 -0
  207. package/src/utils/find-all-npm-dependencies.js.map +1 -0
  208. package/src/utils/symlink-task.d.ts +2 -0
  209. package/src/utils/symlink-task.js +19 -0
  210. package/src/utils/symlink-task.js.map +1 -0
  211. package/src/utils/versions.d.ts +21 -0
  212. package/src/utils/versions.js +25 -0
  213. package/src/utils/versions.js.map +1 -0
  214. package/tsconfig.json +13 -0
  215. package/tsconfig.lib.json +11 -0
  216. package/tsconfig.spec.json +19 -0
  217. package/typings/svg.d.ts +6 -0
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ const path_1 = require("path");
6
+ const child_process_1 = require("child_process");
7
+ const os_1 = require("os");
8
+ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
9
+ const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
10
+ let childProcess;
11
+ function runExecutor(options, context) {
12
+ return (0, tslib_1.__asyncGenerator)(this, arguments, function* runExecutor_1() {
13
+ if ((0, os_1.platform)() !== 'darwin' && options.platform === 'ios') {
14
+ throw new Error(`The run-ios build requires Mac to run`);
15
+ }
16
+ const projectRoot = context.workspace.projects[context.projectName].root;
17
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
18
+ if (options.sync) {
19
+ (0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield (0, tslib_1.__await)((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot)));
20
+ }
21
+ try {
22
+ yield (0, tslib_1.__await)(runCliRun(context.root, projectRoot, options));
23
+ yield yield (0, tslib_1.__await)({ success: true });
24
+ }
25
+ finally {
26
+ if (childProcess) {
27
+ childProcess.kill();
28
+ }
29
+ }
30
+ });
31
+ }
32
+ exports.default = runExecutor;
33
+ function runCliRun(workspaceRoot, projectRoot, options) {
34
+ return new Promise((resolve, reject) => {
35
+ childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/expo/bin/cli.js'), ['run:' + options.platform, ...createRunOptions(options)], {
36
+ cwd: projectRoot,
37
+ });
38
+ // Ensure the child process is killed when the parent exits
39
+ process.on('exit', () => childProcess.kill());
40
+ process.on('SIGTERM', () => childProcess.kill());
41
+ childProcess.on('error', (err) => {
42
+ reject(err);
43
+ });
44
+ childProcess.on('exit', (code) => {
45
+ if (code === 0) {
46
+ resolve(code);
47
+ }
48
+ else {
49
+ reject(code);
50
+ }
51
+ });
52
+ });
53
+ }
54
+ const nxOptions = ['sync', 'platform'];
55
+ const iOSOptions = ['xcodeConfiguration', 'schema'];
56
+ const androidOptions = ['variant'];
57
+ function createRunOptions(options) {
58
+ return Object.keys(options).reduce((acc, k) => {
59
+ if (nxOptions.includes(k) ||
60
+ (options.platform === 'ios' && androidOptions.includes(k)) ||
61
+ (options.platform === 'android' && iOSOptions.includes(k))) {
62
+ return acc;
63
+ }
64
+ const v = options[k];
65
+ {
66
+ if (k === 'xcodeConfiguration') {
67
+ acc.push('--configuration', v);
68
+ }
69
+ else if (k === 'bundler') {
70
+ if (v === false) {
71
+ acc.push('--no-bundler');
72
+ }
73
+ }
74
+ else if (typeof v === 'boolean') {
75
+ if (v === true) {
76
+ // when true, does not need to pass the value true, just need to pass the flag in kebob case
77
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`);
78
+ }
79
+ }
80
+ else {
81
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
82
+ }
83
+ }
84
+ return acc;
85
+ }, []);
86
+ }
87
+ //# sourceMappingURL=run.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/run/run.impl.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AACtD,+BAA4B;AAC5B,iDAAmD;AACnD,2BAA8B;AAE9B,yFAAmF;AACnF,gEAGqC;AAOrC,IAAI,YAA0B,CAAC;AAE/B,SAA+B,WAAW,CACxC,OAAuB,EACvB,OAAwB;;QAExB,IAAI,IAAA,aAAQ,GAAE,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,EAAE;YACzD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SAC1D;QACD,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACzE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,IAAA,6CAA4B,EAC1B,OAAO,CAAC,WAAW,EACnB,2BAAM,IAAA,yBAAQ,EAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA,CACjD,CAAC;SACH;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CAAC;AACT,CAAC"}
@@ -0,0 +1,11 @@
1
+ // options from https://docs.expo.dev/workflow/expo-cli/#expo-runios and https://docs.expo.dev/workflow/expo-cli/#expo-runandroid
2
+ export interface ExpoRunOptions {
3
+ platform: 'ios' | 'android';
4
+ xcodeConfiguration: string; // iOS only, default is Debug
5
+ scheme?: string; // iOS only
6
+ variant: string; // android only, default is debug
7
+ port: number; // default is 8081
8
+ bundler: boolean; // default is true
9
+ sync: boolean; // default is true
10
+ device?: string;
11
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "cli": "nx",
3
+ "$id": "NxExpoRun",
4
+ "$schema": "http://json-schema.org/schema",
5
+ "title": "Run iOS or Android application",
6
+ "description": "Run Expo target options",
7
+ "type": "object",
8
+ "properties": {
9
+ "platform": {
10
+ "description": "Platform to run for (ios, android).",
11
+ "enum": ["ios", "android"],
12
+ "default": "ios"
13
+ },
14
+ "xcodeConfiguration": {
15
+ "type": "string",
16
+ "description": "(iOS) Xcode configuration to use. Debug or Release",
17
+ "default": "Debug"
18
+ },
19
+ "scheme": {
20
+ "type": "string",
21
+ "description": "(iOS) Explicitly set the Xcode scheme to use"
22
+ },
23
+ "variant": {
24
+ "type": "string",
25
+ "description": "(Android) Specify your app's build variant (e.g. debug, release).",
26
+ "default": "debug"
27
+ },
28
+ "device": {
29
+ "type": "string",
30
+ "description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.",
31
+ "alias": "d"
32
+ },
33
+ "sync": {
34
+ "type": "boolean",
35
+ "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.",
36
+ "default": true
37
+ },
38
+ "port": {
39
+ "type": "number",
40
+ "description": "Port to start the Metro bundler on",
41
+ "default": 8081,
42
+ "alias": "p"
43
+ },
44
+ "bundler": {
45
+ "type": "boolean",
46
+ "description": "Whether to skip starting the Metro bundler. True to start it, false to skip it.",
47
+ "default": true
48
+ }
49
+ },
50
+ "required": ["platform"]
51
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nrwl/devkit");
4
+ const start_impl_1 = require("./start.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(start_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/start/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,6CAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,oBAAa,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ // options from https://docs.expo.dev/workflow/expo-cli/#expo-start
2
+
3
+ export interface ExpoStartOptions {
4
+ port: number;
5
+ dev?: boolean;
6
+ devClient?: boolean;
7
+ minify?: boolean;
8
+ https?: boolean;
9
+ clear?: boolean;
10
+ maxWorkers?: number;
11
+ scheme?: string;
12
+ sendTo?: string;
13
+ ios?: boolean;
14
+ android?: boolean;
15
+ web?: boolean;
16
+ host?: string;
17
+ lan?: boolean;
18
+ localhost?: boolean;
19
+ tunnel?: boolean;
20
+ offline?: boolean;
21
+ webpack?: boolean;
22
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "cli": "nx",
3
+ "$id": "NxExpoStart",
4
+ "$schema": "http://json-schema.org/schema",
5
+ "title": "Packager Server for Expo",
6
+ "description": "Packager Server target options",
7
+ "type": "object",
8
+ "properties": {
9
+ "port": {
10
+ "type": "number",
11
+ "description": "Port to start the native Metro bundler on (does not apply to web or tunnel)",
12
+ "default": 19000,
13
+ "alias": "p"
14
+ },
15
+ "clear": {
16
+ "type": "boolean",
17
+ "description": "Clear the Metro bundler cache",
18
+ "alias": "c"
19
+ },
20
+ "maxWorkers": {
21
+ "type": "number",
22
+ "description": "Maximum number of tasks to allow Metro to spawn"
23
+ },
24
+ "dev": {
25
+ "type": "boolean",
26
+ "description": "Turn development mode on or off"
27
+ },
28
+ "devClient": {
29
+ "type": "boolean",
30
+ "description": "Experimental: Starts the bundler for use with the expo-development-client"
31
+ },
32
+ "minify": {
33
+ "type": "boolean",
34
+ "description": "Whether or not to minify code"
35
+ },
36
+ "https": {
37
+ "type": "boolean",
38
+ "description": "To start webpack with https or http protocol"
39
+ },
40
+ "scheme": {
41
+ "type": "string",
42
+ "description": "Custom URI protocol to use with a development build"
43
+ },
44
+ "sentTo": {
45
+ "type": "string",
46
+ "description": "An email address to send a link to",
47
+ "alias": "s"
48
+ },
49
+ "android": {
50
+ "type": "boolean",
51
+ "description": "Opens your app in Expo Go on a connected Android device",
52
+ "alias": "a"
53
+ },
54
+ "ios": {
55
+ "type": "boolean",
56
+ "description": "Opens your app in Expo Go in a currently running iOS simulator on your computer",
57
+ "alias": "i"
58
+ },
59
+ "host": {
60
+ "type": "string",
61
+ "description": "lan (default), tunnel, localhost. Type of host to use. \"tunnel\" allows you to view your link on other networks",
62
+ "alias": "m"
63
+ },
64
+ "tunnel": {
65
+ "type": "boolean",
66
+ "description": "Same as --host tunnel"
67
+ },
68
+ "lan": {
69
+ "type": "boolean",
70
+ "description": "Same as --host lan"
71
+ },
72
+ "localhost": {
73
+ "type": "boolean",
74
+ "description": "Same as --host localhost"
75
+ },
76
+ "offline": {
77
+ "type": "boolean",
78
+ "description": "Allows this command to run while offline"
79
+ },
80
+ "webpack": {
81
+ "type": "boolean",
82
+ "description": "Start a Webpack dev server for the web app."
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,7 @@
1
+ import { ExecutorContext } from '@nrwl/devkit';
2
+ import { ExpoStartOptions } from './schema';
3
+ export interface ExpoStartOutput {
4
+ baseUrl?: string;
5
+ success: boolean;
6
+ }
7
+ export default function startExecutor(options: ExpoStartOptions, context: ExecutorContext): AsyncGenerator<ExpoStartOutput>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const chalk = require("chalk");
5
+ const devkit_1 = require("@nrwl/devkit");
6
+ const child_process_1 = require("child_process");
7
+ const path_1 = require("path");
8
+ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
9
+ let childProcess;
10
+ function startExecutor(options, context) {
11
+ return (0, tslib_1.__asyncGenerator)(this, arguments, function* startExecutor_1() {
12
+ const projectRoot = context.workspace.projects[context.projectName].root;
13
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
14
+ try {
15
+ const baseUrl = `http://localhost:${options.port}`;
16
+ devkit_1.logger.info(chalk.cyan(`Packager is ready at ${baseUrl}`));
17
+ yield (0, tslib_1.__await)(startAsync(context.root, projectRoot, options));
18
+ yield yield (0, tslib_1.__await)({
19
+ baseUrl,
20
+ success: true,
21
+ });
22
+ }
23
+ finally {
24
+ if (childProcess) {
25
+ childProcess.kill();
26
+ }
27
+ }
28
+ });
29
+ }
30
+ exports.default = startExecutor;
31
+ function startAsync(workspaceRoot, projectRoot, options) {
32
+ return new Promise((resolve, reject) => {
33
+ childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/expo/bin/cli.js'), [options.webpack ? 'web' : 'start', ...createStartOptions(options)], { cwd: (0, path_1.join)(workspaceRoot, projectRoot) });
34
+ // Ensure the child process is killed when the parent exits
35
+ process.on('exit', () => childProcess.kill());
36
+ process.on('SIGTERM', () => childProcess.kill());
37
+ childProcess.on('error', (err) => {
38
+ reject(err);
39
+ });
40
+ childProcess.on('exit', (code) => {
41
+ if (code === 0) {
42
+ resolve(code);
43
+ }
44
+ else {
45
+ reject(code);
46
+ }
47
+ });
48
+ });
49
+ }
50
+ const nxOptions = ['webpack'];
51
+ function createStartOptions(options) {
52
+ return Object.keys(options).reduce((acc, k) => {
53
+ const v = options[k];
54
+ if (k === 'dev' && v === false) {
55
+ acc.push(`--no-dev`);
56
+ }
57
+ else if (k === 'minify' && v === false) {
58
+ acc.push(`--no-minify`);
59
+ }
60
+ else if (k === 'https' && v === false) {
61
+ acc.push(`--no-https`);
62
+ }
63
+ else if (!nxOptions.includes(k)) {
64
+ if (typeof v === 'boolean') {
65
+ if (v === true) {
66
+ // when true, does not need to pass the value true, just need to pass the flag in kebob case
67
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`);
68
+ }
69
+ }
70
+ else {
71
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
72
+ }
73
+ }
74
+ return acc;
75
+ }, []);
76
+ }
77
+ //# sourceMappingURL=start.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/start/start.impl.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yCAA8D;AAC9D,iDAAmD;AACnD,+BAA4B;AAE5B,yFAAmF;AAQnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,aAAa,CAC1C,OAAyB,EACzB,OAAwB;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACzE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI;YACF,MAAM,OAAO,GAAG,oBAAoB,OAAO,CAAC,IAAI,EAAE,CAAC;YACnD,eAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;YAE3D,2BAAM,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAErD,iCAAM;gBACJ,OAAO;gBACP,OAAO,EAAE,IAAI;aACd,CAAA,CAAC;SACH;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AAtBD,gCAsBC;AAED,SAAS,UAAU,CACjB,aAAqB,EACrB,WAAmB,EACn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,KAAK,KAAK,EAAE;YAC9B,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACtB;aAAM,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,KAAK,EAAE;YACxC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SACzB;aAAM,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,KAAK,EAAE;YACvC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxB;aAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YACjC,IAAI,OAAO,CAAC,KAAK,SAAS,EAAE;gBAC1B,IAAI,CAAC,KAAK,IAAI,EAAE;oBACd,4FAA4F;oBAC5F,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACpC;aACF;iBAAM;gBACL,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;aACvC;SACF;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nrwl/devkit");
4
+ const sync_deps_impl_1 = require("./sync-deps.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(sync_deps_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/sync-deps/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,qDAAgD;AAEhD,kBAAe,IAAA,0BAAiB,EAAC,wBAAgB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export interface ExpoSyncDepsOptions {
2
+ include: string;
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "cli": "nx",
3
+ "$id": "NxExpoSyncDeps",
4
+ "$schema": "http://json-schema.org/schema",
5
+ "title": "Sync Deps for Expo",
6
+ "description": "Updates package.json with project dependencies",
7
+ "type": "object",
8
+ "properties": {
9
+ "include": {
10
+ "type": "string",
11
+ "description": "A comma-separated list of additional npm packages to include. e.g. 'nx sync-deps --include=react-native-gesture-handler,react-native-safe-area-context'"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,8 @@
1
+ import { ExecutorContext } from '@nrwl/devkit';
2
+ import { ExpoSyncDepsOptions } from './schema';
3
+ export interface ExpoSyncDepsOutput {
4
+ success: boolean;
5
+ }
6
+ export default function syncDepsExecutor(options: ExpoSyncDepsOptions, context: ExecutorContext): AsyncGenerator<ExpoSyncDepsOutput>;
7
+ export declare function syncDeps(projectName: string, projectRoot: string, include?: string): Promise<string[]>;
8
+ export declare function displayNewlyAddedDepsMessage(projectName: string, deps: string[]): void;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.displayNewlyAddedDepsMessage = exports.syncDeps = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const path_1 = require("path");
6
+ const chalk = require("chalk");
7
+ const devkit_1 = require("@nrwl/devkit");
8
+ const project_graph_1 = require("@nrwl/workspace/src/core/project-graph");
9
+ const find_all_npm_dependencies_1 = require("../../utils/find-all-npm-dependencies");
10
+ function syncDepsExecutor(options, context) {
11
+ return (0, tslib_1.__asyncGenerator)(this, arguments, function* syncDepsExecutor_1() {
12
+ const projectRoot = context.workspace.projects[context.projectName].root;
13
+ displayNewlyAddedDepsMessage(context.projectName, yield (0, tslib_1.__await)(syncDeps(context.projectName, projectRoot, options.include)));
14
+ yield yield (0, tslib_1.__await)({ success: true });
15
+ });
16
+ }
17
+ exports.default = syncDepsExecutor;
18
+ function syncDeps(projectName, projectRoot, include) {
19
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
20
+ const graph = yield (0, project_graph_1.createProjectGraphAsync)();
21
+ const npmDeps = (0, find_all_npm_dependencies_1.findAllNpmDependencies)(graph, projectName);
22
+ const packageJsonPath = (0, path_1.join)(projectRoot, 'package.json');
23
+ const packageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
24
+ const newDeps = [];
25
+ const includeDeps = include === null || include === void 0 ? void 0 : include.split(',');
26
+ let updated = false;
27
+ if (!packageJson.dependencies) {
28
+ packageJson.dependencies = {};
29
+ updated = true;
30
+ }
31
+ if (includeDeps) {
32
+ npmDeps.push(...includeDeps);
33
+ }
34
+ npmDeps.forEach((dep) => {
35
+ if (!packageJson.dependencies[dep]) {
36
+ packageJson.dependencies[dep] = '*';
37
+ newDeps.push(dep);
38
+ updated = true;
39
+ }
40
+ });
41
+ if (updated) {
42
+ (0, devkit_1.writeJsonFile)(packageJsonPath, packageJson);
43
+ }
44
+ return newDeps;
45
+ });
46
+ }
47
+ exports.syncDeps = syncDeps;
48
+ function displayNewlyAddedDepsMessage(projectName, deps) {
49
+ if (deps.length > 0) {
50
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Added entries to 'package.json' for '${projectName}' (for autolink):
51
+ ${deps.map((d) => chalk.bold.cyan(`"${d}": "*"`)).join('\n ')}`);
52
+ }
53
+ else {
54
+ devkit_1.logger.info(`${chalk.bold.cyan('info')} Dependencies for '${projectName}' are up to date! No changes made.`);
55
+ }
56
+ }
57
+ exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
58
+ //# sourceMappingURL=sync-deps.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-deps.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/sync-deps/sync-deps.impl.ts"],"names":[],"mappings":";;;;AAAA,+BAA4B;AAC5B,+BAA+B;AAC/B,yCAKsB;AACtB,0EAAiF;AAEjF,qFAA+E;AAQ/E,SAA+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C,GAAG,GAAG,CAAC;gBACpC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAClB,OAAO,GAAG,IAAI,CAAC;aAChB;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,EAAE;YACX,IAAA,sBAAa,EAAC,eAAe,EAAE,WAAW,CAAC,CAAC;SAC7C;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA;AAnCD,4BAmCC;AAED,SAAgB,4BAA4B,CAC1C,WAAmB,EACnB,IAAc;IAEd,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACnB,eAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAC5B,MAAM,CACP,yCAAyC,WAAW;IACrD,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;KACjE;SAAM;QACL,eAAM,CAAC,IAAI,CACT,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAChB,MAAM,CACP,sBAAsB,WAAW,oCAAoC,CACvE,CAAC;KACH;AACH,CAAC;AAhBD,oEAgBC"}
@@ -0,0 +1,5 @@
1
+ import { Tree, GeneratorCallback } from '@nrwl/devkit';
2
+ import { Schema } from './schema';
3
+ export declare function expoApplicationGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
4
+ export default expoApplicationGenerator;
5
+ export declare const expoApplicationSchematic: (options: Schema) => (tree: any, context: any) => Promise<any>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.expoApplicationSchematic = exports.expoApplicationGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
6
+ const devkit_1 = require("@nrwl/devkit");
7
+ const add_linting_1 = require("../../utils/add-linting");
8
+ const add_jest_1 = require("../../utils/add-jest");
9
+ const symlink_task_1 = require("../../utils/symlink-task");
10
+ const normalize_options_1 = require("./lib/normalize-options");
11
+ const init_1 = require("../init/init");
12
+ const add_project_1 = require("./lib/add-project");
13
+ const add_detox_1 = require("./lib/add-detox");
14
+ const create_application_files_1 = require("./lib/create-application-files");
15
+ function expoApplicationGenerator(host, schema) {
16
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
17
+ const options = (0, normalize_options_1.normalizeOptions)(schema);
18
+ (0, create_application_files_1.createApplicationFiles)(host, options);
19
+ (0, add_project_1.addProject)(host, options);
20
+ const initTask = yield (0, init_1.default)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
21
+ const lintTask = yield (0, add_linting_1.addLinting)(host, options.projectName, options.appProjectRoot, [(0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json')], options.linter, options.setParserOptionsProject);
22
+ const jestTask = yield (0, add_jest_1.addJest)(host, options.unitTestRunner, options.projectName, options.appProjectRoot, options.js);
23
+ const detoxTask = yield (0, add_detox_1.addDetox)(host, options);
24
+ const symlinkTask = (0, symlink_task_1.runSymlink)(host.root, options.appProjectRoot);
25
+ if (!options.skipFormat) {
26
+ yield (0, devkit_1.formatFiles)(host);
27
+ }
28
+ return (0, run_tasks_in_serial_1.runTasksInSerial)(initTask, lintTask, jestTask, detoxTask, symlinkTask);
29
+ });
30
+ }
31
+ exports.expoApplicationGenerator = expoApplicationGenerator;
32
+ exports.default = expoApplicationGenerator;
33
+ exports.expoApplicationSchematic = (0, devkit_1.convertNxGenerator)(expoApplicationGenerator);
34
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,2FAAqF;AACrF,yCAMsB;AAEtB,yDAAqD;AACrD,mDAA+C;AAC/C,2DAAs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kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ return {
4
+ presets: ['babel-preset-expo']
5
+ };
6
+ };
@@ -0,0 +1,32 @@
1
+ {
2
+ "expo": {
3
+ "name": "<%= projectName %>",
4
+ "slug": "<%= projectName %>",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "icon": "./assets/icon.png",
8
+ "splash": {
9
+ "image": "./assets/splash.png",
10
+ "resizeMode": "contain",
11
+ "backgroundColor": "#ffffff"
12
+ },
13
+ "updates": {
14
+ "fallbackToCacheTimeout": 0
15
+ },
16
+ "assetBundlePatterns": [
17
+ "**/*"
18
+ ],
19
+ "ios": {
20
+ "supportsTablet": true
21
+ },
22
+ "android": {
23
+ "adaptiveIcon": {
24
+ "foregroundImage": "./assets/adaptive-icon.png",
25
+ "backgroundColor": "#FFFFFF"
26
+ }
27
+ },
28
+ "web": {
29
+ "favicon": "./assets/favicon.png"
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg
3
+ className="material-icons"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ >
9
+ <path d="M0 0h24v24H0z" fill="none" />
10
+ <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" />
11
+ </svg>
@@ -0,0 +1 @@
1
+ export * from './<%= appProjectRoot %>/index.js';
@@ -0,0 +1,18 @@
1
+ {
2
+ "build": {
3
+ "production": {
4
+ "android": {
5
+ "buildType": "app-bundle"
6
+ }
7
+ },
8
+ "development": {
9
+ "android": {
10
+ "developmentClient": true,
11
+ "distribution": "internal"
12
+ }
13
+ }
14
+ },
15
+ "cli": {
16
+ "version": ">= 0.38.1"
17
+ }
18
+ }
@@ -0,0 +1,9 @@
1
+ import 'react-native-gesture-handler';
2
+ import { registerRootComponent } from 'expo';
3
+
4
+ import App from './src/app/App';
5
+
6
+ // registerRootComponent calls AppRegistry.registerComponent('main', () => App);
7
+ // It also ensures that whether you load the app in Expo Go or in a native build,
8
+ // the environment is set up appropriately
9
+ registerRootComponent(App);