@nx/expo 16.0.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.
- package/.eslintrc.json +19 -0
- package/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/collection.json +0 -0
- package/docs/build-list-examples.md +71 -0
- package/docs/prebuild-examples.md +70 -0
- package/docs/run-examples.md +91 -0
- package/docs/start-examples.md +98 -0
- package/executors.json +116 -0
- package/generators.json +61 -0
- package/index.d.ts +4 -0
- package/index.js +12 -0
- package/index.js.map +1 -0
- package/migrations.json +734 -0
- package/package.json +59 -0
- package/plugins/jest/svg-mock.d.ts +0 -0
- package/plugins/jest/svg-mock.js +4 -0
- package/plugins/jest/svg-mock.js.map +1 -0
- package/plugins/metro-resolver.d.ts +1 -0
- package/plugins/metro-resolver.js +135 -0
- package/plugins/metro-resolver.js.map +1 -0
- package/plugins/with-nx-metro.d.ts +8 -0
- package/plugins/with-nx-metro.js +31 -0
- package/plugins/with-nx-metro.js.map +1 -0
- package/plugins/with-nx-webpack.d.ts +5 -0
- package/plugins/with-nx-webpack.js +52 -0
- package/plugins/with-nx-webpack.js.map +1 -0
- package/project.json +61 -0
- package/src/executors/build/build.impl.d.ts +6 -0
- package/src/executors/build/build.impl.js +62 -0
- package/src/executors/build/build.impl.js.map +1 -0
- package/src/executors/build/compat.d.ts +2 -0
- package/src/executors/build/compat.js +6 -0
- package/src/executors/build/compat.js.map +1 -0
- package/src/executors/build/schema.d.ts +14 -0
- package/src/executors/build/schema.json +60 -0
- package/src/executors/build-list/build-fragment.d.ts +54 -0
- package/src/executors/build-list/build-list.impl.d.ts +7 -0
- package/src/executors/build-list/build-list.impl.js +86 -0
- package/src/executors/build-list/build-list.impl.js.map +1 -0
- package/src/executors/build-list/compat.d.ts +2 -0
- package/src/executors/build-list/compat.js +6 -0
- package/src/executors/build-list/compat.js.map +1 -0
- package/src/executors/build-list/schema.d.ts +25 -0
- package/src/executors/build-list/schema.json +79 -0
- package/src/executors/download/compat.d.ts +2 -0
- package/src/executors/download/compat.js +6 -0
- package/src/executors/download/compat.js.map +1 -0
- package/src/executors/download/download.impl.d.ts +15 -0
- package/src/executors/download/download.impl.js +101 -0
- package/src/executors/download/download.impl.js.map +1 -0
- package/src/executors/download/schema.d.ts +3 -0
- package/src/executors/download/schema.json +59 -0
- package/src/executors/ensure-symlink/compat.d.ts +2 -0
- package/src/executors/ensure-symlink/compat.js +6 -0
- package/src/executors/ensure-symlink/compat.js.map +1 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
- package/src/executors/ensure-symlink/schema.json +11 -0
- package/src/executors/export/compat.d.ts +2 -0
- package/src/executors/export/compat.js +6 -0
- package/src/executors/export/compat.js.map +1 -0
- package/src/executors/export/export.impl.d.ts +6 -0
- package/src/executors/export/export.impl.js +69 -0
- package/src/executors/export/export.impl.js.map +1 -0
- package/src/executors/export/schema.d.ts +11 -0
- package/src/executors/export/schema.json +48 -0
- package/src/executors/install/compat.d.ts +2 -0
- package/src/executors/install/compat.js +6 -0
- package/src/executors/install/compat.js.map +1 -0
- package/src/executors/install/install.impl.d.ts +7 -0
- package/src/executors/install/install.impl.js +70 -0
- package/src/executors/install/install.impl.js.map +1 -0
- package/src/executors/install/schema.d.ts +7 -0
- package/src/executors/install/schema.json +34 -0
- package/src/executors/prebuild/compat.d.ts +2 -0
- package/src/executors/prebuild/compat.js +6 -0
- package/src/executors/prebuild/compat.js.map +1 -0
- package/src/executors/prebuild/prebuild.impl.d.ts +7 -0
- package/src/executors/prebuild/prebuild.impl.js +70 -0
- package/src/executors/prebuild/prebuild.impl.js.map +1 -0
- package/src/executors/prebuild/schema.d.ts +7 -0
- package/src/executors/prebuild/schema.json +35 -0
- package/src/executors/run/compat.d.ts +2 -0
- package/src/executors/run/compat.js +6 -0
- package/src/executors/run/compat.js.map +1 -0
- package/src/executors/run/run.impl.d.ts +6 -0
- package/src/executors/run/run.impl.js +112 -0
- package/src/executors/run/run.impl.js.map +1 -0
- package/src/executors/run/schema.d.ts +25 -0
- package/src/executors/run/schema.json +71 -0
- package/src/executors/start/compat.d.ts +2 -0
- package/src/executors/start/compat.js +6 -0
- package/src/executors/start/compat.js.map +1 -0
- package/src/executors/start/schema.d.ts +22 -0
- package/src/executors/start/schema.json +93 -0
- package/src/executors/start/start.impl.d.ts +7 -0
- package/src/executors/start/start.impl.js +73 -0
- package/src/executors/start/start.impl.js.map +1 -0
- package/src/executors/sync-deps/compat.d.ts +2 -0
- package/src/executors/sync-deps/compat.js +6 -0
- package/src/executors/sync-deps/compat.js.map +1 -0
- package/src/executors/sync-deps/schema.d.ts +4 -0
- package/src/executors/sync-deps/schema.json +28 -0
- package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
- package/src/executors/sync-deps/sync-deps.impl.js +62 -0
- package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
- package/src/executors/update/compat.d.ts +2 -0
- package/src/executors/update/compat.js +6 -0
- package/src/executors/update/compat.js.map +1 -0
- package/src/executors/update/schema.d.ts +15 -0
- package/src/executors/update/schema.json +65 -0
- package/src/executors/update/update.impl.d.ts +6 -0
- package/src/executors/update/update.impl.js +59 -0
- package/src/executors/update/update.impl.js.map +1 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +33 -0
- package/src/generators/application/application.js.map +1 -0
- package/src/generators/application/files/app.json.template +33 -0
- package/src/generators/application/files/assets/adaptive-icon.png +0 -0
- package/src/generators/application/files/assets/favicon.png +0 -0
- package/src/generators/application/files/assets/icon.png +0 -0
- package/src/generators/application/files/assets/splash.png +0 -0
- package/src/generators/application/files/babel.config.js.template +6 -0
- package/src/generators/application/files/eas.json.template +28 -0
- package/src/generators/application/files/index.js.template +8 -0
- package/src/generators/application/files/metro.config.js.template +25 -0
- package/src/generators/application/files/package.json.template +17 -0
- package/src/generators/application/files/src/app/App.spec.tsx.template +9 -0
- package/src/generators/application/files/src/app/App.tsx.template +694 -0
- package/src/generators/application/files/test-setup.ts.template +1 -0
- package/src/generators/application/files/tsconfig.app.json.template +9 -0
- package/src/generators/application/files/tsconfig.json.template +26 -0
- package/src/generators/application/lib/add-detox.d.ts +3 -0
- package/src/generators/application/lib/add-detox.js +16 -0
- package/src/generators/application/lib/add-detox.js.map +1 -0
- package/src/generators/application/lib/add-project.d.ts +3 -0
- package/src/generators/application/lib/add-project.js +91 -0
- package/src/generators/application/lib/add-project.js.map +1 -0
- package/src/generators/application/lib/create-application-files.d.ts +3 -0
- package/src/generators/application/lib/create-application-files.js +24 -0
- package/src/generators/application/lib/create-application-files.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +10 -0
- package/src/generators/application/lib/normalize-options.js +30 -0
- package/src/generators/application/lib/normalize-options.js.map +1 -0
- package/src/generators/application/schema.d.ts +19 -0
- package/src/generators/application/schema.json +88 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +51 -0
- package/src/generators/component/component.js.map +1 -0
- package/src/generators/component/files/__fileName__.spec.tsx.template +11 -0
- package/src/generators/component/files/__fileName__.tsx.template +32 -0
- package/src/generators/component/lib/add-import.d.ts +3 -0
- package/src/generators/component/lib/add-import.js +30 -0
- package/src/generators/component/lib/add-import.js.map +1 -0
- package/src/generators/component/lib/normalize-options.d.ts +8 -0
- package/src/generators/component/lib/normalize-options.js +58 -0
- package/src/generators/component/lib/normalize-options.js.map +1 -0
- package/src/generators/component/schema.d.ts +15 -0
- package/src/generators/component/schema.json +83 -0
- package/src/generators/init/init.d.ts +6 -0
- package/src/generators/init/init.js +69 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
- package/src/generators/init/lib/add-git-ignore-entry.js +19 -0
- package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
- package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
- package/src/generators/init/lib/gitignore-entries.js +20 -0
- package/src/generators/init/lib/gitignore-entries.js.map +1 -0
- package/src/generators/init/lib/init-root-babel-config.d.ts +2 -0
- package/src/generators/init/lib/init-root-babel-config.js +14 -0
- package/src/generators/init/lib/init-root-babel-config.js.map +1 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +38 -0
- package/src/generators/library/files/lib/README.md +7 -0
- package/src/generators/library/files/lib/babel.config.json +17 -0
- package/src/generators/library/files/lib/package.json.template +5 -0
- package/src/generators/library/files/lib/src/index.ts.template +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +1 -0
- package/src/generators/library/files/lib/tsconfig.json.template +16 -0
- package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
- package/src/generators/library/lib/normalize-options.d.ts +12 -0
- package/src/generators/library/lib/normalize-options.js +27 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +101 -0
- package/src/generators/library/library.js.map +1 -0
- package/src/generators/library/schema.d.ts +22 -0
- package/src/generators/library/schema.json +99 -0
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +6 -0
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +35 -0
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +1 -0
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.d.ts +5 -0
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +25 -0
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js.map +1 -0
- package/src/migrations/update-14-4-3/add-eas-build-target.d.ts +5 -0
- package/src/migrations/update-14-4-3/add-eas-build-target.js +42 -0
- package/src/migrations/update-14-4-3/add-eas-build-target.js.map +1 -0
- package/src/migrations/update-14-5-1/add-eas-update-target.d.ts +5 -0
- package/src/migrations/update-14-5-1/add-eas-update-target.js +27 -0
- package/src/migrations/update-14-5-1/add-eas-update-target.js.map +1 -0
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.d.ts +9 -0
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +66 -0
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js.map +1 -0
- package/src/migrations/update-15-0-3/change-jest-preset.d.ts +8 -0
- package/src/migrations/update-15-0-3/change-jest-preset.js +74 -0
- package/src/migrations/update-15-0-3/change-jest-preset.js.map +1 -0
- package/src/migrations/update-15-8-3/change-webpack-to-metro.d.ts +8 -0
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js +37 -0
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js.map +1 -0
- package/src/migrations/update-16-0-0/remove-deprecated-targets.d.ts +5 -0
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js +36 -0
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/add-jest.d.ts +2 -0
- package/src/utils/add-jest.js +39 -0
- package/src/utils/add-jest.js.map +1 -0
- package/src/utils/add-linting.d.ts +3 -0
- package/src/utils/add-linting.js +37 -0
- package/src/utils/add-linting.js.map +1 -0
- package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
- package/src/utils/ensure-node-modules-symlink.js +29 -0
- package/src/utils/ensure-node-modules-symlink.js.map +1 -0
- package/src/utils/find-all-npm-dependencies.d.ts +2 -0
- package/src/utils/find-all-npm-dependencies.js +26 -0
- package/src/utils/find-all-npm-dependencies.js.map +1 -0
- package/src/utils/pod-install-task.d.ts +8 -0
- package/src/utils/pod-install-task.js +53 -0
- package/src/utils/pod-install-task.js.map +1 -0
- package/src/utils/symlink-task.d.ts +2 -0
- package/src/utils/symlink-task.js +19 -0
- package/src/utils/symlink-task.js.map +1 -0
- package/src/utils/versions.d.ts +20 -0
- package/src/utils/versions.js +24 -0
- package/src/utils/versions.js.map +1 -0
- package/tsconfig.json +13 -0
- package/tsconfig.lib.json +11 -0
- package/tsconfig.spec.json +20 -0
- package/typings/svg.d.ts +6 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const install_impl_1 = require("./install.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(install_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/install/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,iDAA6C;AAE7C,kBAAe,IAAA,0BAAiB,EAAC,sBAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { ExpoInstallOptions } from './schema';
|
|
3
|
+
export interface ExpoInstallOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function installExecutor(options: ExpoInstallOptions, context: ExecutorContext): AsyncGenerator<ExpoInstallOutput>;
|
|
7
|
+
export declare function installAsync(workspaceRoot: string, options: ExpoInstallOptions): Promise<number>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.installAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/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 installExecutor(options, context) {
|
|
11
|
+
return tslib_1.__asyncGenerator(this, arguments, function* installExecutor_1() {
|
|
12
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
|
+
try {
|
|
14
|
+
yield tslib_1.__await(installAsync(context.root, options));
|
|
15
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
16
|
+
yield yield tslib_1.__await({
|
|
17
|
+
success: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
if (childProcess) {
|
|
22
|
+
childProcess.kill();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.default = installExecutor;
|
|
28
|
+
function installAsync(workspaceRoot, options) {
|
|
29
|
+
return new Promise((resolve, reject) => {
|
|
30
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/@expo/cli/build/bin/cli'), ['install', ...createInstallOptions(options)], { cwd: workspaceRoot, env: process.env });
|
|
31
|
+
// Ensure the child process is killed when the parent exits
|
|
32
|
+
process.on('exit', () => childProcess.kill());
|
|
33
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
34
|
+
childProcess.on('error', (err) => {
|
|
35
|
+
reject(err);
|
|
36
|
+
});
|
|
37
|
+
childProcess.on('exit', (code) => {
|
|
38
|
+
if (code === 0) {
|
|
39
|
+
resolve(code);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
reject(code);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
exports.installAsync = installAsync;
|
|
48
|
+
// options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/install/index.ts
|
|
49
|
+
function createInstallOptions(options) {
|
|
50
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
51
|
+
const v = options[k];
|
|
52
|
+
if (k === 'packages') {
|
|
53
|
+
const packages = typeof v === 'string' ? v.split(',') : v;
|
|
54
|
+
acc.push(...packages);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
if (typeof v === 'boolean') {
|
|
58
|
+
if (v === true) {
|
|
59
|
+
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
60
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return acc;
|
|
68
|
+
}, []);
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=install.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/install/install.impl.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,iDAAmD;AACnD,+BAA4B;AAE5B,yFAAmF;AAOnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,eAAe,CAC5C,OAA2B,EAC3B,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEpE,IAAI;YACF,sBAAM,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA,CAAC;YAC1C,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAEpD,4BAAM;gBACJ,OAAO,EAAE,IAAI;aACd,CAAA,CAAC;SACH;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AAnBD,kCAmBC;AAED,SAAgB,YAAY,CAC1B,aAAqB,EACrB,OAA2B;IAE3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,E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AAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;SACvB;aAAM;YACL,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,7 @@
|
|
|
1
|
+
// options from https://github.com/expo/expo/blob/main/packages/@expo/cli/src/install/index.ts
|
|
2
|
+
|
|
3
|
+
export interface ExpoInstallOptions {
|
|
4
|
+
packages?: string | string[]; // either a string separated by comma or a string array
|
|
5
|
+
check?: boolean; // default is false
|
|
6
|
+
fix?: boolean; // default is false
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"$id": "NxExpoInstall",
|
|
6
|
+
"$schema": "http://json-schema.org/schema",
|
|
7
|
+
"title": "Expo Install",
|
|
8
|
+
"description": "Install a module or other package to a project.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"packages": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"default": [],
|
|
17
|
+
"description": "The names of packages to install",
|
|
18
|
+
"$default": {
|
|
19
|
+
"$source": "argv",
|
|
20
|
+
"index": 0
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"check": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"description": "Check which installed packages need to be updated",
|
|
26
|
+
"default": false
|
|
27
|
+
},
|
|
28
|
+
"fix": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Automatically update any invalid package versions",
|
|
31
|
+
"default": false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const prebuild_impl_1 = require("./prebuild.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(prebuild_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/prebuild/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,mDAA+C;AAE/C,kBAAe,IAAA,0BAAiB,EAAC,uBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { ExpoPrebuildOptions } from './schema';
|
|
3
|
+
export interface ExpoPrebuildOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function prebuildExecutor(options: ExpoPrebuildOptions, context: ExecutorContext): AsyncGenerator<ExpoPrebuildOutput>;
|
|
7
|
+
export declare function prebuildAsync(workspaceRoot: string, projectRoot: string, options: ExpoPrebuildOptions): Promise<number>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prebuildAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/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
|
+
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
10
|
+
const install_impl_1 = require("../install/install.impl");
|
|
11
|
+
let childProcess;
|
|
12
|
+
function prebuildExecutor(options, context) {
|
|
13
|
+
return tslib_1.__asyncGenerator(this, arguments, function* prebuildExecutor_1() {
|
|
14
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
15
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
16
|
+
try {
|
|
17
|
+
yield tslib_1.__await(prebuildAsync(context.root, projectRoot, options));
|
|
18
|
+
if (options.install) {
|
|
19
|
+
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, { fix: true }));
|
|
20
|
+
if (options.platform === 'ios') {
|
|
21
|
+
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
|
|
26
|
+
}
|
|
27
|
+
yield yield tslib_1.__await({
|
|
28
|
+
success: true,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
if (childProcess) {
|
|
33
|
+
childProcess.kill();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
exports.default = prebuildExecutor;
|
|
39
|
+
function prebuildAsync(workspaceRoot, projectRoot, options) {
|
|
40
|
+
return new Promise((resolve, reject) => {
|
|
41
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/@expo/cli/build/bin/cli'), ['prebuild', ...createPrebuildOptions(options), '--no-install'], { cwd: (0, path_1.join)(workspaceRoot, projectRoot), env: process.env });
|
|
42
|
+
// Ensure the child process is killed when the parent exits
|
|
43
|
+
process.on('exit', () => childProcess.kill());
|
|
44
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
45
|
+
childProcess.on('error', (err) => {
|
|
46
|
+
reject(err);
|
|
47
|
+
});
|
|
48
|
+
childProcess.on('exit', (code) => {
|
|
49
|
+
if (code === 0) {
|
|
50
|
+
resolve(code);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
reject(code);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.prebuildAsync = prebuildAsync;
|
|
59
|
+
const nxOptions = ['install', 'interactive'];
|
|
60
|
+
// options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/prebuild/index.ts
|
|
61
|
+
function createPrebuildOptions(options) {
|
|
62
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
63
|
+
if (!nxOptions.includes(k)) {
|
|
64
|
+
const v = options[k];
|
|
65
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}=${v}`);
|
|
66
|
+
}
|
|
67
|
+
return acc;
|
|
68
|
+
}, []);
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=prebuild.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prebuild.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/prebuild/prebuild.impl.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,iDAAmD;AACnD,+BAA4B;AAE5B,yFAAmF;AACnF,mEAA0D;AAC1D,0DAAuD;AAOvD,IAAI,YAA0B,CAAC;AAE/B,SAA+B,gBAAgB,CAC7C,OAA4B,EAC5B,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI;YACF,sBAAM,aAAa,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C,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;QAEjD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/B,IAAI,IAAI,KAAK,CAAC,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC,CAAC;aACf;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,CAAC;aACd;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA3BD,sCA2BC;AAED,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAC7C,iGAAiG;AACjG,SAAS,qBAAqB,CAAC,OAA4B;IACzD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC1B,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACrB,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;SACzC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/prebuild/index.ts
|
|
2
|
+
export interface ExpoPrebuildOptions {
|
|
3
|
+
clean?: boolean; // default is false
|
|
4
|
+
install: boolean; // default is true
|
|
5
|
+
platform: 'all' | 'android' | 'ios'; // default is all
|
|
6
|
+
template?: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"$id": "NxExpoPrebuild",
|
|
6
|
+
"$schema": "http://json-schema.org/schema",
|
|
7
|
+
"title": "Expo Prebuild",
|
|
8
|
+
"description": "Create native iOS and Android project files for building natively.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"clean": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"description": "Delete the native folders and regenerate them before applying changes",
|
|
14
|
+
"default": false
|
|
15
|
+
},
|
|
16
|
+
"install": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "Installing npm packages and CocoaPods.",
|
|
19
|
+
"default": false,
|
|
20
|
+
"x-priority": "internal"
|
|
21
|
+
},
|
|
22
|
+
"platform": {
|
|
23
|
+
"description": "Platforms to sync",
|
|
24
|
+
"default": "all",
|
|
25
|
+
"enum": ["ios", "android", "all"],
|
|
26
|
+
"alias": "p",
|
|
27
|
+
"x-priority": "important"
|
|
28
|
+
},
|
|
29
|
+
"template": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Project template to clone from. File path pointing to a local tar file or a github repo"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"examplesFile": "../../../docs/prebuild-examples.md"
|
|
35
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const run_impl_1 = require("./run.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(run_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/run/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,yCAAqC;AAErC,kBAAe,IAAA,0BAAiB,EAAC,kBAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { ExpoRunOptions } from './schema';
|
|
3
|
+
export interface ExpoRunOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function runExecutor(options: ExpoRunOptions, context: ExecutorContext): AsyncGenerator<ExpoRunOutput>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const child_process_1 = require("child_process");
|
|
7
|
+
const os_1 = require("os");
|
|
8
|
+
const fs_extra_1 = require("fs-extra");
|
|
9
|
+
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
10
|
+
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
11
|
+
const prebuild_impl_1 = require("../prebuild/prebuild.impl");
|
|
12
|
+
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
13
|
+
const install_impl_1 = require("../install/install.impl");
|
|
14
|
+
let childProcess;
|
|
15
|
+
function runExecutor(options, context) {
|
|
16
|
+
return tslib_1.__asyncGenerator(this, arguments, function* runExecutor_1() {
|
|
17
|
+
if ((0, os_1.platform)() !== 'darwin' && options.platform === 'ios') {
|
|
18
|
+
throw new Error(`The run-ios build requires Mac to run`);
|
|
19
|
+
}
|
|
20
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
21
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
22
|
+
if (options.sync) {
|
|
23
|
+
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
|
|
24
|
+
}
|
|
25
|
+
if (!(0, fs_extra_1.existsSync)((0, path_1.join)(context.root, projectRoot, options.platform))) {
|
|
26
|
+
yield tslib_1.__await((0, prebuild_impl_1.prebuildAsync)(context.root, projectRoot, {
|
|
27
|
+
install: options.install,
|
|
28
|
+
platform: options.platform,
|
|
29
|
+
clean: options.clean,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
if (options.install) {
|
|
33
|
+
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
|
|
34
|
+
fix: true,
|
|
35
|
+
}));
|
|
36
|
+
if (options.platform === 'ios') {
|
|
37
|
+
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
|
|
42
|
+
check: true,
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
yield tslib_1.__await(runCliRun(context.root, projectRoot, options));
|
|
47
|
+
yield yield tslib_1.__await({ success: true });
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
if (childProcess) {
|
|
51
|
+
childProcess.kill();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.default = runExecutor;
|
|
57
|
+
function runCliRun(workspaceRoot, projectRoot, options) {
|
|
58
|
+
return new Promise((resolve, reject) => {
|
|
59
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/@expo/cli/build/bin/cli'), ['run:' + options.platform, ...createRunOptions(options), '--no-install'], // pass in no-install to prevent node_modules install
|
|
60
|
+
{
|
|
61
|
+
cwd: projectRoot,
|
|
62
|
+
});
|
|
63
|
+
// Ensure the child process is killed when the parent exits
|
|
64
|
+
process.on('exit', () => childProcess.kill());
|
|
65
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
66
|
+
childProcess.on('error', (err) => {
|
|
67
|
+
reject(err);
|
|
68
|
+
});
|
|
69
|
+
childProcess.on('exit', (code) => {
|
|
70
|
+
if (code === 0) {
|
|
71
|
+
resolve(code);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
reject(code);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const nxOptions = ['sync', 'platform', 'install', 'clean'];
|
|
80
|
+
const iOSOptions = ['xcodeConfiguration', 'schema'];
|
|
81
|
+
const androidOptions = ['variant'];
|
|
82
|
+
/*
|
|
83
|
+
* run options:
|
|
84
|
+
* ios: https://github.com/expo/expo/blob/main/packages/@expo/cli/src/run/ios/index.ts
|
|
85
|
+
* android: https://github.com/expo/expo/blob/main/packages/@expo/cli/src/run/android/index.ts
|
|
86
|
+
*/
|
|
87
|
+
function createRunOptions(options) {
|
|
88
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
89
|
+
if (nxOptions.includes(k) ||
|
|
90
|
+
(options.platform === 'ios' && androidOptions.includes(k)) ||
|
|
91
|
+
(options.platform === 'android' && iOSOptions.includes(k))) {
|
|
92
|
+
return acc;
|
|
93
|
+
}
|
|
94
|
+
const v = options[k];
|
|
95
|
+
{
|
|
96
|
+
if (k === 'xcodeConfiguration') {
|
|
97
|
+
acc.push('--configuration', v);
|
|
98
|
+
}
|
|
99
|
+
else if (typeof v === 'boolean') {
|
|
100
|
+
// no need to pass in the flag when it is true, pass the --no-<flag> when it is false. e.g. --no-build-cache, --no-bundler
|
|
101
|
+
if (v === false) {
|
|
102
|
+
acc.push(`--no-${(0, devkit_1.names)(k).fileName}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return acc;
|
|
110
|
+
}, []);
|
|
111
|
+
}
|
|
112
|
+
//# 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,uCAAoD;AACpD,+BAA4B;AAC5B,iDAAmD;AACnD,2BAA8B;AAC9B,uCAAsC;AAEtC,yFAAmF;AACnF,gEAGqC;AAErC,6DAA0D;AAC1D,mEAA0D;AAC1D,0DAAuD;AAMvD,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,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,IAAA,6CAA4B,EAC1B,OAAO,CAAC,WAAW,EACnB,sBAAM,IAAA,yBAAQ,EACZ,OAAO,CAAC,WAAW,EACnB,WAAW,EACX,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,YAAY,CACrB,CAAA,CACF,CAAC;SACH;QAED,IAAI,CAAC,IAAA,qBAAU,EAAC,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE;YAClE,sBAAM,IAAA,6BAAa,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE;gBAC7C,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,KAAK,EAAE,OAAO,CAAC,KA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C,CAAC;aAChC;iBAAM,IAAI,OAAO,CAAC,KAAK,SAAS,EAAE;gBACjC,0HAA0H;gBAC1H,IAAI,CAAC,KAAK,KAAK,EAAE;oBACf,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACvC;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,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* options from
|
|
3
|
+
* - android: https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/run/android/resolveOptions.ts
|
|
4
|
+
* - ios: https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/run/ios/options/resolveOptions.ts
|
|
5
|
+
*/
|
|
6
|
+
export interface ExpoRunOptions {
|
|
7
|
+
// nx options
|
|
8
|
+
platform: 'ios' | 'android';
|
|
9
|
+
sync: boolean; // default is true
|
|
10
|
+
install?: boolean; // default is true
|
|
11
|
+
clean?: boolean; // default is false
|
|
12
|
+
|
|
13
|
+
// ios only
|
|
14
|
+
scheme?: string; // Xcode scheme to build.
|
|
15
|
+
xcodeConfiguration?: XcodeConfiguration; // Xcode configuration to build. Default `Debug`
|
|
16
|
+
|
|
17
|
+
// android only
|
|
18
|
+
variant?: string;
|
|
19
|
+
|
|
20
|
+
// shared between ios and android
|
|
21
|
+
device?: string;
|
|
22
|
+
port: number; // default is 8081
|
|
23
|
+
bundler: boolean; // default is true
|
|
24
|
+
buildCache?: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"$id": "NxExpoRun",
|
|
6
|
+
"$schema": "http://json-schema.org/schema",
|
|
7
|
+
"title": "Run iOS or Android application",
|
|
8
|
+
"description": "Run Expo target options.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"platform": {
|
|
12
|
+
"description": "Platform to run for (ios, android).",
|
|
13
|
+
"enum": ["ios", "android"],
|
|
14
|
+
"default": "ios",
|
|
15
|
+
"alias": "p"
|
|
16
|
+
},
|
|
17
|
+
"xcodeConfiguration": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "(iOS) Xcode configuration to use. Debug or Release",
|
|
20
|
+
"default": "Debug",
|
|
21
|
+
"x-priority": "important"
|
|
22
|
+
},
|
|
23
|
+
"scheme": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "(iOS) Explicitly set the Xcode scheme to use"
|
|
26
|
+
},
|
|
27
|
+
"variant": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "(Android) Specify your app's build variant (e.g. debug, release).",
|
|
30
|
+
"default": "debug",
|
|
31
|
+
"x-priority": "important"
|
|
32
|
+
},
|
|
33
|
+
"device": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.",
|
|
36
|
+
"alias": "d"
|
|
37
|
+
},
|
|
38
|
+
"sync": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
|
41
|
+
"default": true,
|
|
42
|
+
"x-priority": "internal"
|
|
43
|
+
},
|
|
44
|
+
"port": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"description": "Port to start the Metro bundler on",
|
|
47
|
+
"default": 8081,
|
|
48
|
+
"alias": "p"
|
|
49
|
+
},
|
|
50
|
+
"bundler": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"description": "Whether to skip starting the Metro bundler. True to start it, false to skip it."
|
|
53
|
+
},
|
|
54
|
+
"install": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Should install missing dependencies before building.",
|
|
57
|
+
"default": true
|
|
58
|
+
},
|
|
59
|
+
"buildCache": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"description": "Should use derived data for builds."
|
|
62
|
+
},
|
|
63
|
+
"clean": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"description": "Delete the native folders and regenerate them before applying changes",
|
|
66
|
+
"default": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["platform"],
|
|
70
|
+
"examplesFile": "../../../docs/run-examples.md"
|
|
71
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/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,uCAA+C;AAE/C,6CAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,oBAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/resolveOptions.ts
|
|
2
|
+
|
|
3
|
+
export interface ExpoStartOptions {
|
|
4
|
+
forceManifestType: 'classic' | 'expo-updates';
|
|
5
|
+
privateKeyPath?: string;
|
|
6
|
+
port: number;
|
|
7
|
+
dev?: boolean;
|
|
8
|
+
devClient?: boolean;
|
|
9
|
+
minify?: boolean;
|
|
10
|
+
https?: boolean;
|
|
11
|
+
clear?: boolean;
|
|
12
|
+
maxWorkers?: number;
|
|
13
|
+
scheme?: string;
|
|
14
|
+
ios?: boolean;
|
|
15
|
+
android?: boolean;
|
|
16
|
+
web?: boolean;
|
|
17
|
+
host?: 'localhost' | 'lan' | 'tunnel';
|
|
18
|
+
lan?: boolean;
|
|
19
|
+
localhost?: boolean;
|
|
20
|
+
tunnel?: boolean;
|
|
21
|
+
offline?: boolean;
|
|
22
|
+
}
|