basecampjs 0.0.10 → 0.0.11
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/index.js +25 -25
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -70,7 +70,7 @@ function showHelp() {
|
|
|
70
70
|
console.log(kolor.dim("Build and manage your static campsite.\n"));
|
|
71
71
|
|
|
72
72
|
console.log(kolor.bold("Usage:"));
|
|
73
|
-
console.log("
|
|
73
|
+
console.log(" camper <command> [arguments] [options]\n");
|
|
74
74
|
|
|
75
75
|
console.log(kolor.bold("Project Commands:"));
|
|
76
76
|
console.log(" " + kolor.cyan("init") + " Initialize a new Campsite project in current directory");
|
|
@@ -110,15 +110,15 @@ function showHelp() {
|
|
|
110
110
|
|
|
111
111
|
console.log(kolor.bold("Examples:"));
|
|
112
112
|
console.log(" " + kolor.dim("# Initialize a new project"));
|
|
113
|
-
console.log("
|
|
113
|
+
console.log(" camper init\n");
|
|
114
114
|
console.log(" " + kolor.dim("# Start development"));
|
|
115
|
-
console.log("
|
|
115
|
+
console.log(" camper dev\n");
|
|
116
116
|
console.log(" " + kolor.dim("# Create new content"));
|
|
117
|
-
console.log("
|
|
118
|
-
console.log("
|
|
119
|
-
console.log("
|
|
117
|
+
console.log(" camper make:page about");
|
|
118
|
+
console.log(" camper make:post \"My First Post\"");
|
|
119
|
+
console.log(" camper make:collection products\n");
|
|
120
120
|
console.log(" " + kolor.dim("# Build and preview"));
|
|
121
|
-
console.log("
|
|
121
|
+
console.log(" camper preview\n");
|
|
122
122
|
console.log(kolor.dim("For more information, visit: https://campsitejs.dev"));
|
|
123
123
|
console.log();
|
|
124
124
|
}
|
|
@@ -789,17 +789,17 @@ async function makeContent(type) {
|
|
|
789
789
|
|
|
790
790
|
if (args.length === 0) {
|
|
791
791
|
console.log(kolor.red("❌ Missing name argument"));
|
|
792
|
-
console.log(kolor.dim(`Usage:
|
|
792
|
+
console.log(kolor.dim(`Usage: camper make:${type} <name> [name2, name3, ...]`));
|
|
793
793
|
console.log(kolor.dim("\nExamples:"));
|
|
794
|
-
console.log(kolor.dim("
|
|
795
|
-
console.log(kolor.dim("
|
|
796
|
-
console.log(kolor.dim("
|
|
794
|
+
console.log(kolor.dim(" camper make:page about"));
|
|
795
|
+
console.log(kolor.dim(" camper make:page home, about, contact"));
|
|
796
|
+
console.log(kolor.dim(" camper make:collection products, categories\n"));
|
|
797
797
|
exit(1);
|
|
798
798
|
}
|
|
799
799
|
|
|
800
800
|
// Join all args and split by comma to support both formats:
|
|
801
|
-
//
|
|
802
|
-
//
|
|
801
|
+
// camper make:page home about contact
|
|
802
|
+
// camper make:page home, about, contact
|
|
803
803
|
const namesString = args.join(" ");
|
|
804
804
|
const names = namesString.split(",").map(n => n.trim()).filter(n => n.length > 0);
|
|
805
805
|
|
|
@@ -1024,7 +1024,7 @@ async function init() {
|
|
|
1024
1024
|
// Check if already initialized
|
|
1025
1025
|
if (existsSync(join(targetDir, "campsite.config.js"))) {
|
|
1026
1026
|
console.log(kolor.yellow("⚠️ This directory already has a campsite.config.js file."));
|
|
1027
|
-
console.log(kolor.dim("Run '
|
|
1027
|
+
console.log(kolor.dim("Run 'camper dev' to start developing.\n"));
|
|
1028
1028
|
return;
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
@@ -1087,7 +1087,7 @@ Your cozy static site is ready to build.
|
|
|
1087
1087
|
|
|
1088
1088
|
## Get Started
|
|
1089
1089
|
|
|
1090
|
-
- Run \`
|
|
1090
|
+
- Run \`camper dev\` to start developing
|
|
1091
1091
|
- Edit pages in \`src/pages/\`
|
|
1092
1092
|
- Customize layouts in \`src/layouts/\`
|
|
1093
1093
|
|
|
@@ -1128,10 +1128,10 @@ dist/
|
|
|
1128
1128
|
version: "0.0.1",
|
|
1129
1129
|
type: "module",
|
|
1130
1130
|
scripts: {
|
|
1131
|
-
dev: "
|
|
1132
|
-
build: "
|
|
1133
|
-
serve: "
|
|
1134
|
-
preview: "
|
|
1131
|
+
dev: "camper dev",
|
|
1132
|
+
build: "camper build",
|
|
1133
|
+
serve: "camper serve",
|
|
1134
|
+
preview: "camper preview"
|
|
1135
1135
|
},
|
|
1136
1136
|
dependencies: {
|
|
1137
1137
|
basecampjs: "^0.0.8"
|
|
@@ -1142,7 +1142,7 @@ dist/
|
|
|
1142
1142
|
console.log(kolor.green("✅ Campsite initialized successfully!\n"));
|
|
1143
1143
|
console.log(kolor.bold("Next steps:"));
|
|
1144
1144
|
console.log(kolor.dim(" 1. Install dependencies: npm install"));
|
|
1145
|
-
console.log(kolor.dim(" 2. Start developing:
|
|
1145
|
+
console.log(kolor.dim(" 2. Start developing: camper dev\n"));
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
1148
|
async function clean() {
|
|
@@ -1167,7 +1167,7 @@ async function check() {
|
|
|
1167
1167
|
const configPath = join(cwd, "campsite.config.js");
|
|
1168
1168
|
if (!existsSync(configPath)) {
|
|
1169
1169
|
console.log(kolor.red("❌ campsite.config.js not found"));
|
|
1170
|
-
console.log(kolor.dim(" Run '
|
|
1170
|
+
console.log(kolor.dim(" Run 'camper init' to initialize a project\n"));
|
|
1171
1171
|
hasIssues = true;
|
|
1172
1172
|
} else {
|
|
1173
1173
|
console.log(kolor.green("✅ campsite.config.js found"));
|
|
@@ -1300,7 +1300,7 @@ async function upgrade() {
|
|
|
1300
1300
|
} catch {}
|
|
1301
1301
|
|
|
1302
1302
|
console.log();
|
|
1303
|
-
console.log(kolor.dim("🌲 Tip: Run '
|
|
1303
|
+
console.log(kolor.dim("🌲 Tip: Run 'camper dev' to start developing with the latest version\n"));
|
|
1304
1304
|
resolve();
|
|
1305
1305
|
} else {
|
|
1306
1306
|
console.log();
|
|
@@ -1403,7 +1403,7 @@ async function list() {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
1405
|
|
|
1406
|
-
console.log(kolor.dim("🌲 Tip: Use '
|
|
1406
|
+
console.log(kolor.dim("🌲 Tip: Use 'camper make:<type> <name>' to create new content\n"));
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
1409
|
async function preview() {
|
|
@@ -1436,7 +1436,7 @@ async function main() {
|
|
|
1436
1436
|
const type = command.substring(5); // Remove 'make:' prefix
|
|
1437
1437
|
if (!type) {
|
|
1438
1438
|
console.log(kolor.red("❌ No type specified"));
|
|
1439
|
-
console.log(kolor.dim("Run '
|
|
1439
|
+
console.log(kolor.dim("Run 'camper --help' for available make commands.\n"));
|
|
1440
1440
|
exit(1);
|
|
1441
1441
|
}
|
|
1442
1442
|
await makeContent(type);
|
|
@@ -1479,7 +1479,7 @@ async function main() {
|
|
|
1479
1479
|
break;
|
|
1480
1480
|
default:
|
|
1481
1481
|
console.log(kolor.yellow(`Unknown command: ${command}`));
|
|
1482
|
-
console.log(kolor.dim("Run '
|
|
1482
|
+
console.log(kolor.dim("Run 'camper --help' for usage information."));
|
|
1483
1483
|
exit(1);
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
package/package.json
CHANGED