@storybook/react-native 7.6.13 → 7.6.14
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 +3 -3
- package/scripts/watcher.js +20 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.14",
|
|
4
4
|
"description": "A better way to develop React Native Components for your app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@storybook/preview-api": "^7.6.10",
|
|
64
64
|
"@storybook/preview-web": "^7.6.10",
|
|
65
65
|
"@storybook/react": "^7.6.10",
|
|
66
|
-
"@storybook/react-native-theming": "^7.6.
|
|
66
|
+
"@storybook/react-native-theming": "^7.6.14",
|
|
67
67
|
"chokidar": "^3.5.1",
|
|
68
68
|
"commander": "^8.2.0",
|
|
69
69
|
"dedent": "^1.5.1",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "7f166bb0087578160a3a9f7351ab4ed9da1a749e"
|
|
101
101
|
}
|
package/scripts/watcher.js
CHANGED
|
@@ -6,6 +6,15 @@ const { writeRequires, getMain, getFilePathExtension } = require('./loader');
|
|
|
6
6
|
const { getArguments } = require('./handle-args');
|
|
7
7
|
|
|
8
8
|
const args = getArguments();
|
|
9
|
+
|
|
10
|
+
if (!args.v6Store) {
|
|
11
|
+
console.log(
|
|
12
|
+
"in v7 you don't need the watcher anymore, if you are using v6 compat mode then pass the -v6 flag"
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
process.exit(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
const log = console.log.bind(console);
|
|
10
19
|
|
|
11
20
|
const mainExt = getFilePathExtension(args, 'main');
|
|
@@ -17,6 +26,8 @@ if (previewExt) {
|
|
|
17
26
|
watchPaths.push(`./preview.${previewExt}`);
|
|
18
27
|
}
|
|
19
28
|
|
|
29
|
+
console.log(watchPaths);
|
|
30
|
+
|
|
20
31
|
const updateRequires = (event, watchPath) => {
|
|
21
32
|
if (typeof watchPath === 'string') {
|
|
22
33
|
log(`event ${event} for file ${path.basename(watchPath)}`);
|
|
@@ -25,6 +36,14 @@ const updateRequires = (event, watchPath) => {
|
|
|
25
36
|
};
|
|
26
37
|
|
|
27
38
|
const globs = getMain(args).stories;
|
|
39
|
+
// directory
|
|
40
|
+
// files
|
|
41
|
+
const globsStrings = globs.map((g) => {
|
|
42
|
+
if (typeof g === 'string') return g;
|
|
43
|
+
if (g.directory && g.files) {
|
|
44
|
+
return `${g.directory}/${g.files}`;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
28
47
|
|
|
29
48
|
chokidar
|
|
30
49
|
.watch(watchPaths, { cwd: args.configPath })
|
|
@@ -33,7 +52,7 @@ chokidar
|
|
|
33
52
|
let isReady = false;
|
|
34
53
|
|
|
35
54
|
chokidar
|
|
36
|
-
.watch(
|
|
55
|
+
.watch(globsStrings, { cwd: args.configPath })
|
|
37
56
|
.on('ready', () => {
|
|
38
57
|
log('Watcher is ready, performing initial write');
|
|
39
58
|
writeRequires(args);
|