react-native-bundle-discovery 1.1.0-rc.14 → 1.1.0-rc.15
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/lib/bin.js +1 -1
- package/lib/build.js +2 -19
- package/lib/server.js +9 -5
- package/package.json +1 -1
package/lib/bin.js
CHANGED
package/lib/build.js
CHANGED
|
@@ -34,7 +34,7 @@ function buildHtmlPage(filePath, output, clean, singleFile, verbose) {
|
|
|
34
34
|
try {
|
|
35
35
|
fullJsonPath = require.resolve(jsonFilePath);
|
|
36
36
|
} catch (err) {
|
|
37
|
-
console.error(
|
|
37
|
+
console.error(`❌Error loading file: ${chalk.red(jsonFilePath)}\n\n`);
|
|
38
38
|
console.error(err.message);
|
|
39
39
|
process.exit(1);
|
|
40
40
|
}
|
|
@@ -65,8 +65,6 @@ function buildHtmlPage(filePath, output, clean, singleFile, verbose) {
|
|
|
65
65
|
|
|
66
66
|
const _config = {
|
|
67
67
|
name: "Bundle Discovery",
|
|
68
|
-
// version: null,
|
|
69
|
-
// description: null,
|
|
70
68
|
mode: "single",
|
|
71
69
|
// models: [ [Object] ],
|
|
72
70
|
colorScheme: "auto",
|
|
@@ -74,18 +72,6 @@ function buildHtmlPage(filePath, output, clean, singleFile, verbose) {
|
|
|
74
72
|
upload: false,
|
|
75
73
|
embed: false,
|
|
76
74
|
encodings: false,
|
|
77
|
-
// view: {
|
|
78
|
-
// inspector: true,
|
|
79
|
-
// router: true,
|
|
80
|
-
// noscript: null,
|
|
81
|
-
// serveOnlyAssets: [],
|
|
82
|
-
// // assets: [],
|
|
83
|
-
// bundles: null,
|
|
84
|
-
// // warnings: []
|
|
85
|
-
// },
|
|
86
|
-
// favicon: '/Users/davyd.narbutovich/open-source/bb-recap/node_modules/@discoveryjs/discovery/lib/favicon.png',
|
|
87
|
-
// icon: '/Users/davyd.narbutovich/open-source/bb-recap/node_modules/@discoveryjs/discovery/lib/logo.svg',
|
|
88
|
-
// routers: []
|
|
89
75
|
};
|
|
90
76
|
const _options = {
|
|
91
77
|
singleFile,
|
|
@@ -93,18 +79,15 @@ function buildHtmlPage(filePath, output, clean, singleFile, verbose) {
|
|
|
93
79
|
output,
|
|
94
80
|
//
|
|
95
81
|
cache: true,
|
|
96
|
-
|
|
82
|
+
cachedir: path.resolve(__dirname, "./.discoveryjs-cache"),
|
|
97
83
|
checkCacheTtl: false,
|
|
98
84
|
minify: true,
|
|
99
85
|
dataCompression: true,
|
|
100
86
|
sourcemap: false,
|
|
101
87
|
embed: "by-config",
|
|
102
88
|
experimentalJsonxl: false,
|
|
103
|
-
// output: '/Users/davyd.narbutovich/open-source/bb-recap/build',
|
|
104
89
|
scriptFormat: "esm",
|
|
105
90
|
scriptExternal: [],
|
|
106
|
-
// singleFile: true,
|
|
107
|
-
// clean: false,
|
|
108
91
|
data: true,
|
|
109
92
|
excludeModelOnDataFail: false,
|
|
110
93
|
prettyData: false,
|
package/lib/server.js
CHANGED
|
@@ -32,7 +32,7 @@ function serve(filePath, port, verbose) {
|
|
|
32
32
|
try {
|
|
33
33
|
fullJsonPath = require.resolve(jsonFilePath);
|
|
34
34
|
} catch (err) {
|
|
35
|
-
console.error(`❌
|
|
35
|
+
console.error(`❌Error loading file: ${chalk.red(jsonFilePath)}\n\n`);
|
|
36
36
|
console.error(err.message);
|
|
37
37
|
process.exit(1);
|
|
38
38
|
}
|
|
@@ -64,11 +64,15 @@ function serve(filePath, port, verbose) {
|
|
|
64
64
|
config: configFile,
|
|
65
65
|
configFile,
|
|
66
66
|
}).then((server) =>
|
|
67
|
-
server.listen(PORT, () =>
|
|
67
|
+
server.listen(PORT, () => {
|
|
68
|
+
console.log(`========================================`);
|
|
68
69
|
console.log(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
`🚀 Server listen on ${chalk.green.underline(
|
|
71
|
+
chalk.green(`http://localhost:${PORT}`),
|
|
72
|
+
)}`,
|
|
73
|
+
);
|
|
74
|
+
console.log(`========================================`);
|
|
75
|
+
}),
|
|
72
76
|
);
|
|
73
77
|
}
|
|
74
78
|
|