sv 0.5.8 → 0.5.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/dist/bin.js +11 -5
- package/dist/bin.js.map +1 -1
- package/package.json +3 -3
package/dist/bin.js
CHANGED
|
@@ -25,7 +25,7 @@ import require$$0$3 from 'events';
|
|
|
25
25
|
import { t as templates, c as create$2 } from './index-A89HFWzv.js';
|
|
26
26
|
|
|
27
27
|
var name = "sv";
|
|
28
|
-
var version = "0.5.
|
|
28
|
+
var version = "0.5.9";
|
|
29
29
|
var type = "module";
|
|
30
30
|
var description = "A CLI for creating and updating SvelteKit projects";
|
|
31
31
|
var license = "MIT";
|
|
@@ -51497,12 +51497,16 @@ var tailwindcss = defineAdder({
|
|
|
51497
51497
|
{
|
|
51498
51498
|
name: () => "src/app.css",
|
|
51499
51499
|
content: ({ content }) => {
|
|
51500
|
-
const { ast, generateCode } = parseCss(content);
|
|
51501
51500
|
const layerImports = ["base", "components", "utilities"].map(
|
|
51502
|
-
(layer) => `
|
|
51501
|
+
(layer) => `tailwindcss/${layer}`
|
|
51503
51502
|
);
|
|
51503
|
+
if (layerImports.every((i) => content.includes(i))) {
|
|
51504
|
+
return content;
|
|
51505
|
+
}
|
|
51506
|
+
const { ast, generateCode } = parseCss(content);
|
|
51504
51507
|
const originalFirst = ast.first;
|
|
51505
|
-
const
|
|
51508
|
+
const specifiers = layerImports.map((i) => `'${i}'`);
|
|
51509
|
+
const nodes = addImports(ast, specifiers);
|
|
51506
51510
|
if (originalFirst !== ast.first && originalFirst?.type === "atrule" && originalFirst.name === "import") {
|
|
51507
51511
|
originalFirst.raws.before = "\n";
|
|
51508
51512
|
}
|
|
@@ -55563,6 +55567,7 @@ async function runAdders({
|
|
|
55563
55567
|
);
|
|
55564
55568
|
const details = adderDetails.concat(commDetails);
|
|
55565
55569
|
details.sort((a, b) => {
|
|
55570
|
+
if (!a.dependsOn && !b.dependsOn) return 0;
|
|
55566
55571
|
if (!a.dependsOn) return -1;
|
|
55567
55572
|
if (!b.dependsOn) return 1;
|
|
55568
55573
|
return a.dependsOn.includes(b.id) ? 1 : b.dependsOn.includes(a.id) ? -1 : 0;
|
|
@@ -55707,10 +55712,11 @@ const create = new Command("create").description("scaffolds a new SvelteKit proj
|
|
|
55707
55712
|
if (!packageManager) {
|
|
55708
55713
|
initialSteps.push(`${i++}: ${highlight(`${pm} install`)}`);
|
|
55709
55714
|
}
|
|
55715
|
+
const pmRun = pm === "npm" ? "npm run dev --" : `${pm} dev`;
|
|
55710
55716
|
const steps = [
|
|
55711
55717
|
...initialSteps,
|
|
55712
55718
|
`${i++}: ${highlight('git init && git add -A && git commit -m "Initial commit"')} (optional)`,
|
|
55713
|
-
`${i++}: ${highlight(`${
|
|
55719
|
+
`${i++}: ${highlight(`${pmRun} --open`)}`,
|
|
55714
55720
|
"",
|
|
55715
55721
|
`To close the dev server, hit ${highlight("Ctrl-C")}`,
|
|
55716
55722
|
"",
|