@nx/expo 20.3.2 → 20.4.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.4.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
|
|
6
6
|
"keywords": [
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"main": "./index",
|
|
29
29
|
"types": "index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nx/devkit": "20.
|
|
32
|
-
"@nx/eslint": "20.
|
|
33
|
-
"@nx/jest": "20.
|
|
34
|
-
"@nx/js": "20.
|
|
35
|
-
"@nx/react": "20.
|
|
36
|
-
"@nx/web": "20.
|
|
37
|
-
"@nx/webpack": "20.
|
|
31
|
+
"@nx/devkit": "20.4.0-beta.1",
|
|
32
|
+
"@nx/eslint": "20.4.0-beta.1",
|
|
33
|
+
"@nx/jest": "20.4.0-beta.1",
|
|
34
|
+
"@nx/js": "20.4.0-beta.1",
|
|
35
|
+
"@nx/react": "20.4.0-beta.1",
|
|
36
|
+
"@nx/web": "20.4.0-beta.1",
|
|
37
|
+
"@nx/webpack": "20.4.0-beta.1",
|
|
38
38
|
"enhanced-resolve": "^5.8.3",
|
|
39
39
|
"metro-config": "~0.80.4",
|
|
40
40
|
"metro-resolver": "~0.80.4",
|
package/plugins/plugin.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface ExpoPluginOptions {
|
|
|
9
9
|
installTargetName?: string;
|
|
10
10
|
buildTargetName?: string;
|
|
11
11
|
submitTargetName?: string;
|
|
12
|
+
buildDepsTargetName?: string;
|
|
13
|
+
watchDepsTargetName?: string;
|
|
12
14
|
}
|
|
13
15
|
export declare const createNodesV2: CreateNodesV2<ExpoPluginOptions>;
|
|
14
16
|
export declare const createNodes: CreateNodes<ExpoPluginOptions>;
|
package/plugins/plugin.js
CHANGED
|
@@ -10,6 +10,8 @@ const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculat
|
|
|
10
10
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
11
11
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
12
12
|
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
13
|
+
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
14
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
13
15
|
function readTargetsCache(cachePath) {
|
|
14
16
|
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
15
17
|
}
|
|
@@ -111,6 +113,7 @@ function buildExpoTargets(projectRoot, options, context) {
|
|
|
111
113
|
options: { cwd: projectRoot },
|
|
112
114
|
},
|
|
113
115
|
};
|
|
116
|
+
(0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
|
|
114
117
|
return targets;
|
|
115
118
|
}
|
|
116
119
|
function getAppConfig(configFilePath, context) {
|
|
@@ -16,6 +16,7 @@ const add_e2e_1 = require("./lib/add-e2e");
|
|
|
16
16
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
17
17
|
const init_root_babel_config_1 = require("../../utils/init-root-babel-config");
|
|
18
18
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
19
|
+
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
19
20
|
async function expoApplicationGenerator(host, schema) {
|
|
20
21
|
return await expoApplicationGeneratorInternal(host, {
|
|
21
22
|
addPlugin: false,
|
|
@@ -29,6 +30,7 @@ async function expoApplicationGeneratorInternal(host, schema) {
|
|
|
29
30
|
skipFormat: true,
|
|
30
31
|
addTsPlugin: schema.useTsSolution,
|
|
31
32
|
formatter: schema.formatter,
|
|
33
|
+
platform: 'web',
|
|
32
34
|
});
|
|
33
35
|
const options = await (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
34
36
|
tasks.push(jsInitTask);
|
|
@@ -66,6 +68,7 @@ async function expoApplicationGeneratorInternal(host, schema) {
|
|
|
66
68
|
if (options.useTsSolution) {
|
|
67
69
|
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(host, options.appProjectRoot);
|
|
68
70
|
}
|
|
71
|
+
(0, sort_fields_1.sortPackageJsonFields)(host, options.appProjectRoot);
|
|
69
72
|
if (!options.skipFormat) {
|
|
70
73
|
await (0, devkit_1.formatFiles)(host);
|
|
71
74
|
}
|
|
@@ -32,6 +32,16 @@ async function expoInitGeneratorInternal(host, schema) {
|
|
|
32
32
|
'expo:run-android',
|
|
33
33
|
'expo-run-android',
|
|
34
34
|
],
|
|
35
|
+
buildDepsTargetName: [
|
|
36
|
+
'build-deps',
|
|
37
|
+
'expo:build-deps',
|
|
38
|
+
'expo-build-deps',
|
|
39
|
+
],
|
|
40
|
+
watchDepsTargetName: [
|
|
41
|
+
'watch-deps',
|
|
42
|
+
'expo:watch-deps',
|
|
43
|
+
'expo-watch-deps',
|
|
44
|
+
],
|
|
35
45
|
}, schema.updatePackageScripts);
|
|
36
46
|
}
|
|
37
47
|
const tasks = [];
|
|
@@ -15,6 +15,7 @@ const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaul
|
|
|
15
15
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
16
16
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
17
17
|
const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
|
|
18
|
+
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
18
19
|
async function expoLibraryGenerator(host, schema) {
|
|
19
20
|
return await expoLibraryGeneratorInternal(host, {
|
|
20
21
|
addPlugin: false,
|
|
@@ -71,6 +72,7 @@ async function expoLibraryGeneratorInternal(host, schema) {
|
|
|
71
72
|
if (options.isUsingTsSolutionConfig) {
|
|
72
73
|
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
|
|
73
74
|
}
|
|
75
|
+
(0, sort_fields_1.sortPackageJsonFields)(host, options.projectRoot);
|
|
74
76
|
if (!options.skipFormat) {
|
|
75
77
|
await (0, devkit_1.formatFiles)(host);
|
|
76
78
|
}
|