@yannosay/sinth 0.0.8 → 0.0.9
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/src/sinth.ts +12 -13
package/package.json
CHANGED
package/src/sinth.ts
CHANGED
|
@@ -1583,12 +1583,12 @@ function compileFile(filePath: string, opts: CompileOptions): string | null {
|
|
|
1583
1583
|
return fs.existsSync(base) ? path.basename(base) : undefined;
|
|
1584
1584
|
})();
|
|
1585
1585
|
|
|
1586
|
-
// Convert CSS absolute paths to relative paths from the HTML output
|
|
1587
|
-
const relativeCssLinks = cssLinks.map(css => {
|
|
1588
|
-
const rel = path.relative(path.dirname(absPath), css).replace(/\\/g, "/");
|
|
1589
|
-
return rel.startsWith(".") ? rel : "./" + rel;
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1586
|
+
// Convert CSS absolute paths to relative paths from the HTML output
|
|
1587
|
+
const relativeCssLinks = cssLinks.map(css => {
|
|
1588
|
+
const rel = path.relative(path.dirname(absPath), css).replace(/\\/g, "/");
|
|
1589
|
+
return rel.startsWith(".") ? rel : "./" + rel;
|
|
1590
|
+
});
|
|
1591
|
+
|
|
1592
1592
|
const head = renderHead(headData, relativeCssLinks, jsLinks, scopedCSS, companionJS);
|
|
1593
1593
|
const scriptTags: string[] = [];
|
|
1594
1594
|
|
|
@@ -1819,12 +1819,12 @@ async function main(): Promise<void> {
|
|
|
1819
1819
|
const minify = args.includes("--prod") || Boolean(cfg.minify);
|
|
1820
1820
|
const libraryPaths = (cfg.libraryPaths as string[] | undefined) ?? [path.join(cwd, "libraries")];
|
|
1821
1821
|
|
|
1822
|
-
// Remove flag values from args so they don't get treated as .sinth files
|
|
1823
|
-
const flagValues = new Set<string>();
|
|
1824
|
-
if (outDirIdx !== -1) flagValues.add(args[outDirIdx + 1]);
|
|
1825
|
-
if (portIdx !== -1) flagValues.add(args[portIdx + 1]);
|
|
1826
|
-
const cleanArgs = args.filter(a => !a.startsWith("--") && !flagValues.has(a));
|
|
1827
|
-
|
|
1822
|
+
// Remove flag values from args so they don't get treated as .sinth files
|
|
1823
|
+
const flagValues = new Set<string>();
|
|
1824
|
+
if (outDirIdx !== -1) flagValues.add(args[outDirIdx + 1]);
|
|
1825
|
+
if (portIdx !== -1) flagValues.add(args[portIdx + 1]);
|
|
1826
|
+
const cleanArgs = args.filter(a => !a.startsWith("--") && !flagValues.has(a));
|
|
1827
|
+
|
|
1828
1828
|
const opts: CompileOptions = { projectRoot: cwd, outDir, libraryPaths, minify, checkOnly: false };
|
|
1829
1829
|
|
|
1830
1830
|
switch (command) {
|
|
@@ -2088,7 +2088,6 @@ component Card(title, color = "blue") {
|
|
|
2088
2088
|
\x1b[32m✓ Sinth project scaffolded!\x1b[0m
|
|
2089
2089
|
|
|
2090
2090
|
\x1b[1mNext steps:\x1b[0m
|
|
2091
|
-
npm install
|
|
2092
2091
|
sinth dev
|
|
2093
2092
|
sinth build
|
|
2094
2093
|
`);
|