webanvil 0.0.3 → 0.0.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["serve.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,8BAA4B;AAIhD,wBAA8B,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["serve.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,8BAA4B;AAIhD,wBAA8B,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAgCjF"}
|
package/lib/commands/serve.js
CHANGED
|
@@ -24,7 +24,12 @@ async function serve(configuration) {
|
|
|
24
24
|
browser.watch(index_1.path.join(configuration.directories.styles, `**/*`).full)
|
|
25
25
|
.on("change", run(rebuild, reload));
|
|
26
26
|
browser.init({
|
|
27
|
-
server:
|
|
27
|
+
server: {
|
|
28
|
+
baseDir: configuration.directories.output.full,
|
|
29
|
+
routes: {
|
|
30
|
+
[configuration.base]: configuration.directories.output.full
|
|
31
|
+
}
|
|
32
|
+
},
|
|
28
33
|
open: false
|
|
29
34
|
});
|
|
30
35
|
return new Promise(() => void 0);
|
|
@@ -23,8 +23,10 @@ type Configuration = {
|
|
|
23
23
|
renderer: RendererConfiguration;
|
|
24
24
|
directories: DirectoriesConfiguration;
|
|
25
25
|
plugins: Plugin[];
|
|
26
|
+
base: string;
|
|
26
27
|
};
|
|
27
28
|
export type PlainConfiguration = {
|
|
29
|
+
base: string;
|
|
28
30
|
renderer: Record<keyof RendererConfiguration, string>;
|
|
29
31
|
directories: Record<keyof DirectoriesConfiguration, string>;
|
|
30
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["Configuration.ts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,CAAA;AAED,KAAK,aAAa,GAAG;IACjB,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,WAAW,EAAE,wBAAwB,CAAA;IACrC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,qBAAqB,EAAE,MAAM,CAAC,CAAA;IACrD,WAAW,EAAE,MAAM,CAAC,MAAM,wBAAwB,EAAE,MAAM,CAAC,CAAA;CAC9D,CAAA;AAmBD,kBAAU,aAAa,CAAC;IACb,MAAM,IAAI,GAAI,eAAe,OAAO,CAAC,kBAAkB,CAAC,KAAG,aAuBjE,CAAA;CACJ;AAGD,eAAe,aAAa,CAAA"}
|
package/lib/main.js
CHANGED
|
@@ -9,8 +9,8 @@ const DEFAULT_OUTPUT = "./website-dist";
|
|
|
9
9
|
const DEFAULT_ENTRY = "./website";
|
|
10
10
|
async function main(...varargs) {
|
|
11
11
|
const options = minimist(varargs, {
|
|
12
|
-
alias: { o: "output", e: "entry" },
|
|
13
|
-
default: { output: DEFAULT_OUTPUT, entry: DEFAULT_ENTRY }
|
|
12
|
+
alias: { o: "output", e: "entry", b: "base" },
|
|
13
|
+
default: { output: DEFAULT_OUTPUT, entry: DEFAULT_ENTRY, base: "/" }
|
|
14
14
|
});
|
|
15
15
|
const [command] = varargs;
|
|
16
16
|
const directories = {
|
|
@@ -22,7 +22,7 @@ async function main(...varargs) {
|
|
|
22
22
|
partials: `${options.entry}/templates/partials`,
|
|
23
23
|
layouts: `${options.entry}/templates/layouts`
|
|
24
24
|
};
|
|
25
|
-
const configuration = Configuration_1.default.from({ directories });
|
|
25
|
+
const configuration = Configuration_1.default.from({ directories, base: options.base });
|
|
26
26
|
switch (command) {
|
|
27
27
|
default:
|
|
28
28
|
case "build":
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webanvil",
|
|
3
3
|
"description": "A zero configuration static site generator that just works.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"webanvil": "bin/run"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"serve:website": "npx webanvil serve",
|
|
11
|
+
"serve:website": "npx webanvil serve --base /webanvil/",
|
|
12
12
|
"build": "npm run build:library && npm run build:website",
|
|
13
13
|
"build:library": "npm run clean && tsc --build",
|
|
14
|
-
"build:website": "
|
|
14
|
+
"build:website": "npx webanvil",
|
|
15
15
|
"clean": "tsc --build --clean",
|
|
16
16
|
"preprepare": "ts-patch install",
|
|
17
17
|
"prepack": "npm run build"
|