vowel 0.1.10 → 0.1.12
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/server.js +9 -2
- package/svelte.config.js +2 -6
- package/vercel.json +5 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -17,7 +17,7 @@ const arg = !isBuild ? process.argv[2] : false;
|
|
|
17
17
|
const $home = isBuild ? process.cwd() : directory;
|
|
18
18
|
|
|
19
19
|
const define = {
|
|
20
|
-
$home: directory
|
|
20
|
+
$home: [directory]
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const config = {
|
|
@@ -37,19 +37,26 @@ const vercelDefaults = {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
async function buildProject() {
|
|
40
|
-
console.log('Building...');
|
|
41
40
|
const outputDir = join($home[0], '.output');
|
|
41
|
+
|
|
42
42
|
const vercelConfigPath = join($home[0], 'vercel.json');
|
|
43
|
+
|
|
43
44
|
const vercelDirPath = join($home[0], '.vercel');
|
|
44
45
|
const projectJsonPath = join(vercelDirPath, 'project.json');
|
|
45
46
|
let projectData = null;
|
|
46
47
|
|
|
47
48
|
try {
|
|
49
|
+
console.log({ config });
|
|
48
50
|
if (existsSync(projectJsonPath)) {
|
|
51
|
+
console.log('inside');
|
|
49
52
|
const data = await readFile(projectJsonPath, 'utf-8');
|
|
53
|
+
console.log({ data });
|
|
50
54
|
projectData = JSON.parse(data);
|
|
51
55
|
}
|
|
52
56
|
|
|
57
|
+
console.log({ projectData });
|
|
58
|
+
console.log('Building...');
|
|
59
|
+
|
|
53
60
|
await build(config);
|
|
54
61
|
|
|
55
62
|
console.log('Build completed.');
|
package/svelte.config.js
CHANGED
|
@@ -3,12 +3,8 @@ import path, { join } from 'path';
|
|
|
3
3
|
import mri from 'mri';
|
|
4
4
|
|
|
5
5
|
const args = mri(process.argv);
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const homeDir = isDev || args.build ? false : args.directory;
|
|
10
|
-
|
|
11
|
-
const relativePathToHome = path.relative(process.cwd(), homeDir);
|
|
6
|
+
const homeDir = args.directory;
|
|
7
|
+
const relativePathToHome = path.relative(process.cwd(), homeDir || '/');
|
|
12
8
|
|
|
13
9
|
/** @type {import('@sveltejs/kit').Config} */
|
|
14
10
|
const config = {
|