elegance-js 1.8.1 → 1.9.0
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/components/Link.mjs +1 -1
- package/dist/docs/components/Header.mjs +1 -1
- package/dist/docs/docs/basics/page.mjs +1 -1
- package/dist/docs/docs/components/CodeBlock.mjs +1 -1
- package/dist/docs/docs/components/DocsLayout.mjs +1 -1
- package/dist/docs/docs/components/Header.mjs +1 -1
- package/dist/docs/docs/concepts/page.mjs +1 -1
- package/dist/docs/docs/page-files/page.mjs +1 -1
- package/dist/docs/nullpage/page.mjs +1 -1
- package/dist/docs/page.mjs +3 -1
- package/dist/internal/deprecate.mjs +1 -1
- package/dist/page_compiler.mjs +18 -7
- package/dist/server/createState.mjs +1 -1
- package/dist/server/loadHook.mjs +1 -1
- package/package.json +1 -1
package/dist/components/Link.mjs
CHANGED
package/dist/docs/page.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/internal/deprecate.ts
|
|
2
2
|
var ShowDeprecationWarning = (msg) => {
|
|
3
|
-
console.warn("\x1B[31m", msg);
|
|
3
|
+
console.warn("\x1B[31m", msg, "\x1B[0m");
|
|
4
4
|
console.trace("Stack Trace:");
|
|
5
5
|
};
|
|
6
6
|
|
|
@@ -233,6 +233,8 @@ var RootLayout = (...children) => body(
|
|
|
233
233
|
);
|
|
234
234
|
|
|
235
235
|
// src/docs/page.ts
|
|
236
|
+
import fs from "fs";
|
|
237
|
+
fs.existsSync("./page.mjs");
|
|
236
238
|
var metadata = () => {
|
|
237
239
|
return head(
|
|
238
240
|
{},
|
package/dist/page_compiler.mjs
CHANGED
|
@@ -662,23 +662,32 @@ var build = async () => {
|
|
|
662
662
|
}
|
|
663
663
|
const projectFiles = getProjectFiles(options.pagesDirectory);
|
|
664
664
|
const start = performance.now();
|
|
665
|
+
const recursionFlag = Symbol("external-node-modules-recursion");
|
|
665
666
|
{
|
|
666
667
|
const externalPackagesPlugin = {
|
|
667
668
|
name: "external-packages",
|
|
668
669
|
setup(build2) {
|
|
669
670
|
build2.onResolve({ filter: /^[^./]/ }, async (args) => {
|
|
670
|
-
if (args.
|
|
671
|
+
if (args.pluginData?.[recursionFlag]) {
|
|
671
672
|
return;
|
|
672
673
|
}
|
|
673
|
-
const
|
|
674
|
-
kind: args.kind,
|
|
674
|
+
const result = await build2.resolve(args.path, {
|
|
675
675
|
resolveDir: args.resolveDir,
|
|
676
|
-
|
|
676
|
+
kind: args.kind,
|
|
677
|
+
pluginData: { [recursionFlag]: true }
|
|
677
678
|
});
|
|
678
|
-
if (
|
|
679
|
-
return
|
|
679
|
+
if (result.errors.length > 0 || result.external || !result.path) {
|
|
680
|
+
return result;
|
|
681
|
+
}
|
|
682
|
+
const nodeModulesIndex = result.path.indexOf("/node_modules/");
|
|
683
|
+
if (nodeModulesIndex === -1) {
|
|
684
|
+
return result;
|
|
685
|
+
}
|
|
686
|
+
const isNested = result.path.includes("/node_modules/", nodeModulesIndex + 14);
|
|
687
|
+
if (isNested) {
|
|
688
|
+
return result;
|
|
680
689
|
}
|
|
681
|
-
return
|
|
690
|
+
return { path: args.path, external: true };
|
|
682
691
|
});
|
|
683
692
|
}
|
|
684
693
|
};
|
|
@@ -699,6 +708,7 @@ var build = async () => {
|
|
|
699
708
|
"PROD": options.environment === "development" ? "false" : "true"
|
|
700
709
|
}
|
|
701
710
|
});
|
|
711
|
+
console.log("built files");
|
|
702
712
|
}
|
|
703
713
|
const pagesTranspiled = performance.now();
|
|
704
714
|
const {
|
|
@@ -723,6 +733,7 @@ var build = async () => {
|
|
|
723
733
|
log(green(bold(`Compiled ${projectFiles.length} files in ${Math.ceil(end - start)}ms!`)));
|
|
724
734
|
}
|
|
725
735
|
process.send({ event: "message", data: "compile-finish" });
|
|
736
|
+
console.log("BUILD FINISHED");
|
|
726
737
|
if (shouldClientHardReload) {
|
|
727
738
|
log("Sending hard reload..");
|
|
728
739
|
process.send({ event: "message", data: "hard-reload" });
|
package/dist/server/loadHook.mjs
CHANGED