hyperspan 1.0.5 → 1.0.7
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 +1 -1
- package/src/commands.ts +11 -13
package/package.json
CHANGED
package/src/commands.ts
CHANGED
|
@@ -18,21 +18,21 @@ program
|
|
|
18
18
|
.description('Create a new hyperspan project')
|
|
19
19
|
.argument('<string>', 'project name')
|
|
20
20
|
.action(async (name) => {
|
|
21
|
-
console.log(`Creating project ${name}`);
|
|
21
|
+
console.log(`[Hyperspan] Creating project ${name}`);
|
|
22
22
|
|
|
23
23
|
const emitter = degit('vlucas/hyperspan/packages/starter-template', {
|
|
24
|
-
cache:
|
|
24
|
+
cache: false,
|
|
25
25
|
force: true,
|
|
26
26
|
verbose: false,
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
await emitter.clone(`${name}`);
|
|
30
|
-
console.log(`Hyperspan project created in ${name}`);
|
|
31
|
-
console.log(`Installing dependencies...`);
|
|
30
|
+
console.log(`[Hyperspan] project created in ${name}`);
|
|
31
|
+
console.log(`[Hyperspan] Installing dependencies...`);
|
|
32
32
|
execSync(`cd ${name} && bun install`, { stdio: 'pipe' });
|
|
33
|
-
console.log(`Dependencies installed!`);
|
|
34
|
-
console.log(`
|
|
35
|
-
|
|
33
|
+
console.log(`[Hyperspan] Dependencies installed!`);
|
|
34
|
+
console.log(`[Hyperspan] Start your server (copy & paste):`);
|
|
35
|
+
console.log(`\n\ncd ${name} && bun run dev`);
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -44,7 +44,6 @@ program
|
|
|
44
44
|
.option('--dir <path>', 'directory of your hyperspan project', './')
|
|
45
45
|
.description('Start the server')
|
|
46
46
|
.action(async function (options) {
|
|
47
|
-
|
|
48
47
|
const IS_DEV_MODE = process.argv.includes('dev');
|
|
49
48
|
|
|
50
49
|
// Developer mode (extra logging, etc.)
|
|
@@ -57,9 +56,7 @@ program
|
|
|
57
56
|
const serverFile = `${options.dir}/app/routes`;
|
|
58
57
|
|
|
59
58
|
if (!fs.existsSync(serverFile)) {
|
|
60
|
-
console.error(
|
|
61
|
-
'Error: Could not find app/routes - Are you in a Hyperspan project directory?'
|
|
62
|
-
);
|
|
59
|
+
console.error('Error: Could not find app/routes - Are you in a Hyperspan project directory?');
|
|
63
60
|
process.exit(1);
|
|
64
61
|
}
|
|
65
62
|
|
|
@@ -69,7 +66,9 @@ program
|
|
|
69
66
|
const server = await createHyperspanServer({ development: IS_DEV_MODE });
|
|
70
67
|
const httpServer = startBunServer(server);
|
|
71
68
|
|
|
72
|
-
console.log(
|
|
69
|
+
console.log(
|
|
70
|
+
`[Hyperspan] Server started on http://localhost:${httpServer.port} (Press Ctrl+C to stop)`
|
|
71
|
+
);
|
|
73
72
|
console.log('========================================\n');
|
|
74
73
|
});
|
|
75
74
|
|
|
@@ -80,7 +79,6 @@ program
|
|
|
80
79
|
.action(async (options) => {
|
|
81
80
|
console.error('Error: SSG build not implemented yet... :(');
|
|
82
81
|
process.exit(1);
|
|
83
|
-
|
|
84
82
|
});
|
|
85
83
|
|
|
86
84
|
program.parse();
|