@nx/react-native 18.2.1 → 18.2.2
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/react-native",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/devkit": "18.2.
|
|
40
|
-
"@nx/jest": "18.2.
|
|
41
|
-
"@nx/js": "18.2.
|
|
42
|
-
"@nx/eslint": "18.2.
|
|
43
|
-
"@nx/react": "18.2.
|
|
44
|
-
"@nx/workspace": "18.2.
|
|
45
|
-
"@nrwl/react-native": "18.2.
|
|
39
|
+
"@nx/devkit": "18.2.2",
|
|
40
|
+
"@nx/jest": "18.2.2",
|
|
41
|
+
"@nx/js": "18.2.2",
|
|
42
|
+
"@nx/eslint": "18.2.2",
|
|
43
|
+
"@nx/react": "18.2.2",
|
|
44
|
+
"@nx/workspace": "18.2.2",
|
|
45
|
+
"@nrwl/react-native": "18.2.2"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"ng-update": {
|
|
@@ -35,7 +35,13 @@ async function* reactNativeStorybookExecutor(options, context) {
|
|
|
35
35
|
}
|
|
36
36
|
exports.default = reactNativeStorybookExecutor;
|
|
37
37
|
function runCliStorybook(workspaceRoot, options) {
|
|
38
|
-
const storiesFiles = options.searchDir.flatMap((dir) =>
|
|
38
|
+
const storiesFiles = options.searchDir.flatMap((dir) => {
|
|
39
|
+
const storyFilePaths = (0, glob_1.sync)((0, path_1.join)(dir, options.pattern));
|
|
40
|
+
return storyFilePaths.map((storyFilePath) => {
|
|
41
|
+
const loaderPath = (0, path_1.resolve)((0, path_1.dirname)(options.outputFile));
|
|
42
|
+
return (0, path_1.relative)(loaderPath, storyFilePath);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
39
45
|
if (storiesFiles.length === 0) {
|
|
40
46
|
devkit_1.logger.warn(`${chalk.bold.yellow('warn')} No stories found.`);
|
|
41
47
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join } from 'path';
|
|
1
|
+
import { join, relative, resolve, dirname } from 'path';
|
|
2
2
|
import { ExecutorContext, logger, readJsonFile } from '@nx/devkit';
|
|
3
3
|
import { fileExists } from '@nx/workspace/src/utilities/fileutils';
|
|
4
4
|
import * as chalk from 'chalk';
|
|
@@ -66,9 +66,15 @@ export function runCliStorybook(
|
|
|
66
66
|
workspaceRoot: string,
|
|
67
67
|
options: ReactNativeStorybookOptions
|
|
68
68
|
) {
|
|
69
|
-
const storiesFiles: string[] = options.searchDir.flatMap((dir) =>
|
|
70
|
-
globSync(join(dir, options.pattern))
|
|
71
|
-
|
|
69
|
+
const storiesFiles: string[] = options.searchDir.flatMap((dir) => {
|
|
70
|
+
const storyFilePaths: string[] = globSync(join(dir, options.pattern));
|
|
71
|
+
|
|
72
|
+
return storyFilePaths.map((storyFilePath) => {
|
|
73
|
+
const loaderPath: string = resolve(dirname(options.outputFile));
|
|
74
|
+
return relative(loaderPath, storyFilePath);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
72
78
|
if (storiesFiles.length === 0) {
|
|
73
79
|
logger.warn(`${chalk.bold.yellow('warn')} No stories found.`);
|
|
74
80
|
}
|