ghostcn 1.0.2 → 1.0.3

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/README.md CHANGED
@@ -27,12 +27,12 @@ You own the code. You customize the classes. Zero vendor lock-in.
27
27
 
28
28
  ## Features
29
29
 
30
- - ?? **Theme-Native**: Directly installs raw Handlebars partials and CSS into your theme folders.
31
- - ? **Zero Latency**: Bundled offline registry ensures blazing fast installation even without internet.
32
- - ?? **Interactive Multi-Select**: Run `npx ghostcn add` without arguments to select and batch-install multiple components interactively.
33
- - ?? **Tailwind & Vanilla CSS**: Pre-styled with utility classes and full Vanilla CSS stylesheets with Ghost CSS custom properties.
34
- - ?? **Ghost Members API**: Native support for Ghost attributes (`data-members-form="subscribe"`, Portal checkout triggers).
35
- - ??? **100% gscan Validated**: All components strictly adhere to Ghost theme guidelines and pass official `gscan` checks with 0 errors.
30
+ - 📦 **Theme-Native**: Directly installs raw Handlebars partials and CSS into your theme folders.
31
+ - ⚡ **Zero Latency**: Bundled offline registry ensures blazing fast installation even without internet.
32
+ - 🎯 **Interactive Multi-Select**: Run `npx ghostcn add` without arguments to select and batch-install multiple components interactively.
33
+ - 🎨 **Tailwind & Vanilla CSS**: Pre-styled with utility classes and full Vanilla CSS stylesheets with Ghost CSS custom properties.
34
+ - 🔑 **Ghost Members API**: Native support for Ghost attributes (`data-members-form="subscribe"`, Portal checkout triggers).
35
+ - 🛡️ **100% gscan Validated**: All components strictly adhere to Ghost theme guidelines and pass official `gscan` checks with 0 errors.
36
36
 
37
37
  ---
38
38
 
@@ -125,13 +125,14 @@ Include the installed partial anywhere in your Handlebars templates:
125
125
  ## Project Structure
126
126
 
127
127
  ```text
128
- ??? packages/
129
- ? ??? cli/ # ghostcn CLI (Commander, Prompts, TypeScript, tests)
130
- ??? registry/
131
- ? ??? index.json # Registry catalog index
132
- ? ??? components/ # Component manifests and templates
133
- ??? example-theme/ # Sample Ghost theme showing integration
134
- ??? .github/workflows/ # Automated CI pipeline
128
+ ghostcn/
129
+ ├── packages/
130
+ │ └── cli/ # ghostcn CLI (Commander, Prompts, TypeScript, tests)
131
+ ├── registry/
132
+ │ ├── index.json # Registry catalog index
133
+ │ └── components/ # Component manifests and templates
134
+ ├── example-theme/ # Sample Ghost theme showing integration
135
+ └── .github/workflows/ # Automated CI pipeline
135
136
  ```
136
137
 
137
138
  ---
@@ -155,6 +156,16 @@ npx gscan .
155
156
 
156
157
  ---
157
158
 
159
+ ## Troubleshooting
160
+
161
+ ### Clearing npx cache
162
+ If you've previously run an older version of `ghostcn`, npx may cache it locally. To always run the latest version:
163
+ ```bash
164
+ npx ghostcn@latest <command>
165
+ ```
166
+
167
+ ---
168
+
158
169
  ## License
159
170
 
160
- MIT ? [Geekbits Org](https://github.com/Geekbits-Org)
171
+ MIT © [Geekbits Org](https://github.com/Geekbits-Org)
@@ -67,7 +67,7 @@ async function add(componentName, options = {}) {
67
67
  const cwd = process.cwd();
68
68
  const configPath = path_1.default.join(cwd, 'components.json');
69
69
  if (!fs_1.default.existsSync(configPath)) {
70
- console.error(chalk_1.default.red('components.json not found. Please run "ghostcn init" first.'));
70
+ console.error(chalk_1.default.red('components.json not found. Please run "npx ghostcn init" first.'));
71
71
  process.exit(1);
72
72
  }
73
73
  let config;
@@ -9,7 +9,7 @@ const path_1 = __importDefault(require("path"));
9
9
  const prompts_1 = __importDefault(require("prompts"));
10
10
  const chalk_1 = __importDefault(require("chalk"));
11
11
  async function init(options = {}) {
12
- console.log(chalk_1.default.blue('Initializing Ghost UI component system...'));
12
+ console.log(chalk_1.default.blue('Initializing ghostcn component system...'));
13
13
  const cwd = process.cwd();
14
14
  // Verify it's a ghost theme
15
15
  const packageJsonPath = path_1.default.join(cwd, 'package.json');
@@ -8,14 +8,14 @@ const chalk_1 = __importDefault(require("chalk"));
8
8
  const ora_1 = __importDefault(require("ora"));
9
9
  const registry_1 = require("../utils/registry");
10
10
  async function list() {
11
- const spinner = (0, ora_1.default)('Fetching available components from Ghost UI registry...').start();
11
+ const spinner = (0, ora_1.default)('Fetching available components from ghostcn registry...').start();
12
12
  try {
13
13
  const items = await (0, registry_1.getRegistryIndex)();
14
14
  if (!items || items.length === 0) {
15
15
  spinner.warn('No components found in the registry.');
16
16
  return;
17
17
  }
18
- spinner.succeed(`Found ${items.length} components in Ghost UI registry:\n`);
18
+ spinner.succeed(`Found ${items.length} components in ghostcn registry:\n`);
19
19
  for (const item of items) {
20
20
  console.log(` ${chalk_1.default.bold.cyan(item.name)}`);
21
21
  console.log(` ${chalk_1.default.gray(item.description)}`);
@@ -24,8 +24,8 @@ async function list() {
24
24
  }
25
25
  console.log('');
26
26
  }
27
- console.log(`Install any component using: ${chalk_1.default.green('ghostcn add <component>')}`);
28
- console.log(`Or run ${chalk_1.default.green('ghostcn add')} to select interactively.\n`);
27
+ console.log(`Install any component using: ${chalk_1.default.green('npx ghostcn add <component>')}`);
28
+ console.log(`Or run ${chalk_1.default.green('npx ghostcn add')} to select interactively.\n`);
29
29
  }
30
30
  catch (err) {
31
31
  spinner.fail(`Failed to fetch component catalog: ${err.message || err}`);
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ function main() {
21
21
  .action(init_1.init);
22
22
  program
23
23
  .command('list')
24
- .description('List all available components in the Ghost UI registry')
24
+ .description('List all available components in the ghostcn registry')
25
25
  .action(list_1.list);
26
26
  program
27
27
  .command('add')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostcn",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "The shadcn/ui for Ghost CMS themes - component distribution system",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",