bonzai-tools 1.0.100 → 1.0.101
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/dist/bconfig.js +10 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/bconfig.js
CHANGED
|
@@ -87,6 +87,14 @@ async function main() {
|
|
|
87
87
|
const utilsDest = path.join(bonzaiDir, 'utils');
|
|
88
88
|
copyDirectory(utilsSrc, utilsDest);
|
|
89
89
|
|
|
90
|
+
// Copy frontend build
|
|
91
|
+
const buildSrc = path.join(TEMPLATE_DIR, 'build');
|
|
92
|
+
if (fs.existsSync(buildSrc)) {
|
|
93
|
+
console.log('Copying frontend build...');
|
|
94
|
+
const buildDest = path.join(bonzaiDir, 'build');
|
|
95
|
+
copyDirectory(buildSrc, buildDest);
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
// Write .ignore file in bonzai directory
|
|
91
99
|
const ignoreTargetPath = path.join(bonzaiDir, '.ignore');
|
|
92
100
|
if (!fs.existsSync(ignoreTargetPath)) {
|
|
@@ -165,7 +173,7 @@ async function main() {
|
|
|
165
173
|
console.log('All code stays on your machine\n');
|
|
166
174
|
console.log('Relay server running on localhost:3001');
|
|
167
175
|
console.log('Terminal WebSocket available at ws://localhost:3001/terminal');
|
|
168
|
-
console.log('
|
|
176
|
+
console.log('App available at http://localhost:3001\n');
|
|
169
177
|
|
|
170
178
|
// Start the server automatically
|
|
171
179
|
const server = spawn('node', ['receiver.js'], {
|
|
@@ -178,7 +186,7 @@ async function main() {
|
|
|
178
186
|
});
|
|
179
187
|
|
|
180
188
|
// Open browser automatically
|
|
181
|
-
exec('open
|
|
189
|
+
exec('open http://localhost:3001');
|
|
182
190
|
|
|
183
191
|
// Handle server process
|
|
184
192
|
server.on('close', (serverCode) => {
|
package/dist/index.js
CHANGED
|
@@ -89,6 +89,12 @@ async function main() {
|
|
|
89
89
|
const utilsSrc = path.join(TEMPLATE_DIR, "utils");
|
|
90
90
|
const utilsDest = path.join(bonzaiDir, "utils");
|
|
91
91
|
copyDirectory(utilsSrc, utilsDest);
|
|
92
|
+
const buildSrc = path.join(TEMPLATE_DIR, "build");
|
|
93
|
+
if (fs.existsSync(buildSrc)) {
|
|
94
|
+
console.log("Copying frontend build...");
|
|
95
|
+
const buildDest = path.join(bonzaiDir, "build");
|
|
96
|
+
copyDirectory(buildSrc, buildDest);
|
|
97
|
+
}
|
|
92
98
|
const ignoreTargetPath = path.join(bonzaiDir, ".ignore");
|
|
93
99
|
if (!fs.existsSync(ignoreTargetPath)) {
|
|
94
100
|
console.log("Writing .ignore file...");
|
|
@@ -152,7 +158,7 @@ async function main() {
|
|
|
152
158
|
console.log("All code stays on your machine\n");
|
|
153
159
|
console.log("Relay server running on localhost:3001");
|
|
154
160
|
console.log("Terminal WebSocket available at ws://localhost:3001/terminal");
|
|
155
|
-
console.log("
|
|
161
|
+
console.log("App available at http://localhost:3001\n");
|
|
156
162
|
const server = spawn("node", ["receiver.js"], {
|
|
157
163
|
stdio: "inherit",
|
|
158
164
|
cwd: bonzaiDir,
|
|
@@ -161,7 +167,7 @@ async function main() {
|
|
|
161
167
|
BONZAI_REPO_DIR: currentDir
|
|
162
168
|
}
|
|
163
169
|
});
|
|
164
|
-
exec("open
|
|
170
|
+
exec("open http://localhost:3001");
|
|
165
171
|
server.on("close", (serverCode) => {
|
|
166
172
|
console.log(`
|
|
167
173
|
Server stopped with code ${serverCode}`);
|