elegance-js 1.1.2 → 1.1.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/dist/build.d.ts +1 -0
- package/dist/build.mjs +3 -2
- package/dist/compile_docs.mjs +3 -2
- package/dist/server/server.mjs +1 -1
- package/package.json +1 -1
package/dist/build.d.ts
CHANGED
package/dist/build.mjs
CHANGED
|
@@ -276,7 +276,7 @@ var MIME_TYPES = {
|
|
|
276
276
|
".ico": "image/x-icon",
|
|
277
277
|
".txt": "text/plain; charset=utf-8"
|
|
278
278
|
};
|
|
279
|
-
function startServer({ root, port = 3e3, host = "
|
|
279
|
+
function startServer({ root, port = 3e3, host = "localhost", environment = "production" }) {
|
|
280
280
|
if (!root) throw new Error("Root directory must be specified.");
|
|
281
281
|
const requestHandler = async (req, res) => {
|
|
282
282
|
try {
|
|
@@ -1023,7 +1023,8 @@ var compile = async (props) => {
|
|
|
1023
1023
|
startServer({
|
|
1024
1024
|
root: props.server.root ?? DIST_DIR,
|
|
1025
1025
|
environment: props.environment,
|
|
1026
|
-
port: props.server.port ?? 3e3
|
|
1026
|
+
port: props.server.port ?? 3e3,
|
|
1027
|
+
host: props.server.host ?? "localhost"
|
|
1027
1028
|
});
|
|
1028
1029
|
}
|
|
1029
1030
|
if (watch) {
|
package/dist/compile_docs.mjs
CHANGED
|
@@ -279,7 +279,7 @@ var MIME_TYPES = {
|
|
|
279
279
|
".ico": "image/x-icon",
|
|
280
280
|
".txt": "text/plain; charset=utf-8"
|
|
281
281
|
};
|
|
282
|
-
function startServer({ root, port = 3e3, host = "
|
|
282
|
+
function startServer({ root, port = 3e3, host = "localhost", environment: environment2 = "production" }) {
|
|
283
283
|
if (!root) throw new Error("Root directory must be specified.");
|
|
284
284
|
const requestHandler = async (req, res) => {
|
|
285
285
|
try {
|
|
@@ -1026,7 +1026,8 @@ var compile = async (props) => {
|
|
|
1026
1026
|
startServer({
|
|
1027
1027
|
root: props.server.root ?? DIST_DIR,
|
|
1028
1028
|
environment: props.environment,
|
|
1029
|
-
port: props.server.port ?? 3e3
|
|
1029
|
+
port: props.server.port ?? 3e3,
|
|
1030
|
+
host: props.server.host ?? "localhost"
|
|
1030
1031
|
});
|
|
1031
1032
|
}
|
|
1032
1033
|
if (watch) {
|
package/dist/server/server.mjs
CHANGED
|
@@ -16,7 +16,7 @@ var MIME_TYPES = {
|
|
|
16
16
|
".ico": "image/x-icon",
|
|
17
17
|
".txt": "text/plain; charset=utf-8"
|
|
18
18
|
};
|
|
19
|
-
function startServer({ root, port = 3e3, host = "
|
|
19
|
+
function startServer({ root, port = 3e3, host = "localhost", environment = "production" }) {
|
|
20
20
|
if (!root) throw new Error("Root directory must be specified.");
|
|
21
21
|
const requestHandler = async (req, res) => {
|
|
22
22
|
try {
|