vending-mocha 0.1.4 → 0.1.6

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/bin/cli.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  import fs from 'fs';
4
4
  import path from 'path';
5
- import { execSync } from 'child_process';
6
5
  import { fileURLToPath } from 'url';
7
6
  import inquirer from 'inquirer';
8
7
  import chalk from 'chalk';
@@ -22,7 +21,8 @@ const IGNORE_FILES = [
22
21
  'docs',
23
22
  'bin',
24
23
  'package-lock.json',
25
- '.DS_Store'
24
+ '.DS_Store',
25
+ 'LICENSE'
26
26
  ];
27
27
 
28
28
  function getAsciiArt() {
@@ -152,25 +152,6 @@ function copyRecursiveSync(src, dest, destRoot) {
152
152
  }
153
153
  }
154
154
 
155
- function updateSiteConfig(projectDir, config) {
156
- const configPath = path.join(projectDir, 'src', 'site.config.ts');
157
- if (fs.existsSync(configPath)) {
158
- let content = fs.readFileSync(configPath, 'utf8');
159
-
160
- // Update title
161
- if (config.title) {
162
- content = content.replace(/title:\s*".*?"/, `title: "${config.title}"`);
163
- }
164
-
165
- // Update URL
166
- if (config.url) {
167
- content = content.replace(/url:\s*".*?"/, `url: "${config.url}"`);
168
- }
169
-
170
- fs.writeFileSync(configPath, content, 'utf8');
171
- }
172
- }
173
-
174
155
  function updatePackageJson(projectDir, config) {
175
156
  const pkgPath = path.join(projectDir, 'package.json');
176
157
  if (fs.existsSync(pkgPath)) {
@@ -179,6 +160,7 @@ function updatePackageJson(projectDir, config) {
179
160
  pkg.name = config.projectName;
180
161
  pkg.version = '0.0.0';
181
162
  pkg.description = config.description || `My new blog built with vending-mocha`;
163
+ pkg.license = 'Unknown';
182
164
 
183
165
  // Remove the bin entry so the new project doesn't try to be a CLI itself
184
166
  if (pkg.bin) {
@@ -250,6 +232,39 @@ async function handleNew(projectName, options) {
250
232
  updatePackageJson(projectDir, config);
251
233
  console.log(chalk.green('✔ package.json updated'));
252
234
 
235
+ // 3. Create .gitignore (since npm pack ignores it)
236
+ const gitignorePath = path.join(projectDir, '.gitignore');
237
+ if (!fs.existsSync(gitignorePath)) {
238
+ const gitignoreContent = `# Logs
239
+ logs
240
+ *.log
241
+ npm-debug.log*
242
+ yarn-debug.log*
243
+ yarn-error.log*
244
+ pnpm-debug.log*
245
+ lerna-debug.log*
246
+
247
+ node_modules
248
+ dist
249
+ dist-ssr
250
+ docs
251
+ *.local
252
+
253
+ # Editor directories and files
254
+ .vscode/*
255
+ !.vscode/extensions.json
256
+ .idea
257
+ .DS_Store
258
+ *.suo
259
+ *.ntvs*
260
+ *.njsproj
261
+ *.sln
262
+ *.sw?
263
+ `;
264
+ fs.writeFileSync(gitignorePath, gitignoreContent);
265
+ console.log(chalk.green('✔ .gitignore created'));
266
+ }
267
+
253
268
  console.log(chalk.green(`\nSuccess! Created ${config.projectName} at ${projectDir}`));
254
269
  console.log('\nInside that directory, you can run:');
255
270
  console.log(chalk.cyan(` cd ${config.projectName}`));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vending-mocha",
3
3
  "description": "A personal blogging framework for developers.",
4
- "version": "0.1.4",
4
+ "version": "0.1.6",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "bin": {
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: "Placeholder 1"
3
+ description: "A Placeholder description for the project"
4
+ link: "https://example.com/"
5
+ status: "inactive"
6
+ weight: 5
7
+ ---
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: "Placeholder 2"
3
+ description: "A placeholder description for the project"
4
+ link: "https://example.com/"
5
+ status: "dead"
6
+ weight: 1
7
+ ---
package/src/posts.json ADDED
@@ -0,0 +1,23 @@
1
+ [
2
+ {
3
+ "slug": "hello-world",
4
+ "title": "Welcome to Vending Mocha ☕",
5
+ "date": "2026-02-17 04:00:00",
6
+ "summary": "Welcome to your new blogging framework! This is a sample post to get you started.",
7
+ "weight": 0
8
+ },
9
+ {
10
+ "slug": "markdown-features",
11
+ "title": "Markdown Features Demo 📝",
12
+ "date": "2026-02-17 02:00:00",
13
+ "summary": "A demonstration of the Markdown features supported by Vending Mocha, including code blocks, lists, and formatting.",
14
+ "weight": 0
15
+ },
16
+ {
17
+ "slug": "deploy-to-github-pages",
18
+ "title": "Deploying to GitHub Pages 🚀",
19
+ "date": "2026-02-17 01:00:00",
20
+ "summary": "A step-by-step guide to deploying your Vending Mocha blog to GitHub Pages using GitHub Actions.",
21
+ "weight": 0
22
+ }
23
+ ]
@@ -0,0 +1,23 @@
1
+ [
2
+ {
3
+ "name": "Vending Mocha",
4
+ "description": "A lightweight, blazing fast, personal blogging framework built with React.",
5
+ "link": "https://github.com/kcthota/vending-mocha",
6
+ "status": "active",
7
+ "weight": 10
8
+ },
9
+ {
10
+ "name": "Placeholder 1",
11
+ "description": "A Placeholder description for the project",
12
+ "link": "https://example.com/",
13
+ "status": "inactive",
14
+ "weight": 5
15
+ },
16
+ {
17
+ "name": "Placeholder 2",
18
+ "description": "A placeholder description for the project",
19
+ "link": "https://example.com/",
20
+ "status": "dead",
21
+ "weight": 1
22
+ }
23
+ ]
@@ -3,7 +3,7 @@
3
3
  export const siteConfig = {
4
4
  title: "Vending Mocha",
5
5
  url: "https://vendingmocha.com",
6
- description: '**Vending Mocha** is a lightweight, strictly typed, and blazing fast personal blogging framework built with React, TypeScript, and Vite.\n\nIt is designed to be minimal, easy to customize, and deployed within minutes. Create a site, update the config, and start writing!',
6
+ description: '**Vending Mocha** is a lightweight, strictly typed, and blazing fast personal blogging framework built with React.\n\nIt is designed to be minimal, easy to customize, and deployed within minutes. Create a site, update the config, and start writing!\n\nSimply write your new posts in markdown files and Vending Mocha will publish them as static HTML files to your GitHub Pages site.',
7
7
  image: '/images/profile.png',
8
8
  contact: {
9
9
  github: "https://github.com/kcthota/vending-mocha",
@@ -1,7 +0,0 @@
1
- ---
2
- title: "Legacy API Wrapper"
3
- description: "An old library I wrote back in 2018. No longer maintained but good for reference."
4
- link: "https://example.com/legacy-api"
5
- status: "dead"
6
- weight: 1
7
- ---
@@ -1,7 +0,0 @@
1
- ---
2
- title: "Task Master 3000"
3
- description: "A productivity application for managing daily tasks and goals efficiently."
4
- link: "https://example.com/task-master"
5
- status: "inactive"
6
- weight: 5
7
- ---