@inglorious/ssx 1.3.2 → 1.3.3
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/bin/ssx.js +11 -8
- package/package.json +1 -1
package/bin/ssx.js
CHANGED
|
@@ -27,17 +27,19 @@ program
|
|
|
27
27
|
program
|
|
28
28
|
.command("dev")
|
|
29
29
|
.description("Start development server with hot reload")
|
|
30
|
-
.option("-c, --config <file>", "config file", "site.config.js")
|
|
30
|
+
.option("-c, --config <file>", "config file path", "site.config.js")
|
|
31
31
|
.option("-r, --root <dir>", "source root directory", "src")
|
|
32
32
|
.option("-p, --port <port>", "dev server port", 3000)
|
|
33
33
|
.action(async (options) => {
|
|
34
34
|
const cwd = process.cwd()
|
|
35
|
-
const
|
|
35
|
+
const configPath = resolveConfigFile(options.config)
|
|
36
36
|
|
|
37
37
|
try {
|
|
38
38
|
await dev({
|
|
39
39
|
...options,
|
|
40
|
-
config,
|
|
40
|
+
config: undefined,
|
|
41
|
+
root: undefined,
|
|
42
|
+
configPath,
|
|
41
43
|
rootDir: path.resolve(cwd, options.root),
|
|
42
44
|
port: Number(options.port),
|
|
43
45
|
})
|
|
@@ -50,23 +52,24 @@ program
|
|
|
50
52
|
program
|
|
51
53
|
.command("build")
|
|
52
54
|
.description("Build site from pages directory")
|
|
53
|
-
.option("-c, --config <file>", "config file", "site.config.js")
|
|
55
|
+
.option("-c, --config <file>", "config file path", "site.config.js")
|
|
54
56
|
.option("-r, --root <dir>", "source root directory", "src")
|
|
55
57
|
.option("-o, --out <dir>", "output directory", "dist")
|
|
56
58
|
.option("-i, --incremental", "enable incremental builds", true)
|
|
57
59
|
.option("-f, --force", "force clean build (ignore cache)", false)
|
|
58
60
|
.action(async (options) => {
|
|
59
61
|
const cwd = process.cwd()
|
|
60
|
-
const
|
|
62
|
+
const configPath = resolveConfigFile(options.config)
|
|
61
63
|
|
|
62
64
|
try {
|
|
63
65
|
await build({
|
|
64
66
|
...options,
|
|
65
|
-
config,
|
|
67
|
+
config: undefined,
|
|
68
|
+
root: undefined,
|
|
69
|
+
out: undefined,
|
|
70
|
+
configPath,
|
|
66
71
|
rootDir: path.resolve(cwd, options.root),
|
|
67
72
|
outDir: path.resolve(cwd, options.out),
|
|
68
|
-
incremental: options.incremental, // Enabled by default
|
|
69
|
-
clean: options.force,
|
|
70
73
|
})
|
|
71
74
|
|
|
72
75
|
// if (result.skipped) {
|
package/package.json
CHANGED