create-hlou-site 0.1.1 → 0.1.2
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 +7 -5
- package/index.mjs +5 -3
- package/lib/spec.mjs +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,11 +17,13 @@ It asks for the site's name, its source locale and its other locales, then:
|
|
|
17
17
|
Next.js static-export template every Hlou site is built from;
|
|
18
18
|
- writes an empty **site spec** in `hlou/site/`: `site.json` (locales, theme,
|
|
19
19
|
the site's name), `pages/home.json`, `content/<locale>.json`;
|
|
20
|
-
- names Hlou's Claude Code plugin marketplace in `.claude/settings.json`
|
|
21
|
-
|
|
20
|
+
- names Hlou's Claude Code plugin marketplace in `.claude/settings.json` and
|
|
21
|
+
enables its Figma plugin, so Claude Code offers to install it when you trust
|
|
22
|
+
the folder (otherwise: `/plugin marketplace add hloudev/hlou-claude-plugins`,
|
|
23
|
+
then `/plugin install hlou-figma-handoff@hlou-claude-plugins`).
|
|
22
24
|
|
|
23
|
-
Then ask your agent for pages — the starter's `AGENTS.md` and
|
|
24
|
-
|
|
25
|
+
Then ask your agent for pages — it reads the starter's `AGENTS.md` and
|
|
26
|
+
`.claude/skills/` on its own — and bring the site to Hlou with `pnpm hlou:pack` and
|
|
25
27
|
**New project › Import**. The starter's README says more.
|
|
26
28
|
|
|
27
29
|
## Options
|
|
@@ -33,7 +35,7 @@ create-hlou-site [folder] [options]
|
|
|
33
35
|
--locale <tag> the source locale, e.g. fr (default fr)
|
|
34
36
|
--locales <tags> the other locales, comma-separated, e.g. en,ar
|
|
35
37
|
--yes, -y ask nothing: the defaults for whatever is missing
|
|
36
|
-
--no-plugin-hint leave .claude/settings.json as the starter has it
|
|
38
|
+
--no-plugin-hint leave .claude/settings.json as the starter has it (no plugin)
|
|
37
39
|
--from <path|url> a local starter folder or .tar.gz instead of the pinned release
|
|
38
40
|
--ref <commit> another commit of hloudev/hlou-starter-next
|
|
39
41
|
```
|
package/index.mjs
CHANGED
|
@@ -25,6 +25,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
emptySpec,
|
|
28
|
+
FIGMA_PLUGIN,
|
|
28
29
|
parseLocales,
|
|
29
30
|
PLUGIN_MARKETPLACE,
|
|
30
31
|
sitePackageJson,
|
|
@@ -209,11 +210,12 @@ export async function createSite(args, log = (line) => stdout.write(`${line}\n`)
|
|
|
209
210
|
log(' pnpm install # pnpm 10 (corepack enable), Node 24');
|
|
210
211
|
log(' pnpm dev # compiles hlou/site/ and serves http://localhost:3000');
|
|
211
212
|
log('');
|
|
212
|
-
log('Then ask your agent for pages: AGENTS.md and .claude/skills/
|
|
213
|
+
log('Then ask your agent for pages: it reads AGENTS.md and .claude/skills/ on its own.');
|
|
213
214
|
if (args.pluginHint) {
|
|
214
|
-
log('
|
|
215
|
+
log('Claude Code offers Hlou’s Figma plugin (Figma → spec) when you trust the folder;');
|
|
216
|
+
log('if it does not:');
|
|
215
217
|
log(` /plugin marketplace add ${PLUGIN_MARKETPLACE.repo}`);
|
|
216
|
-
log(` /plugin install
|
|
218
|
+
log(` /plugin install ${FIGMA_PLUGIN}`);
|
|
217
219
|
}
|
|
218
220
|
log('When it is ready: pnpm hlou:pack, then Hlou › New project › Import.');
|
|
219
221
|
return target;
|
package/lib/spec.mjs
CHANGED
|
@@ -164,10 +164,13 @@ export const PLUGIN_MARKETPLACE = {
|
|
|
164
164
|
repo: 'hloudev/hlou-claude-plugins',
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
/** The plugin the scaffold enables: Figma → the site spec. */
|
|
168
|
+
export const FIGMA_PLUGIN = `hlou-figma-handoff@${PLUGIN_MARKETPLACE.name}`;
|
|
169
|
+
|
|
167
170
|
/**
|
|
168
|
-
* `.claude/settings.json` with Hlou's plugin marketplace known
|
|
169
|
-
*
|
|
170
|
-
* any; nothing in it is dropped.
|
|
171
|
+
* `.claude/settings.json` with Hlou's plugin marketplace known and its Figma
|
|
172
|
+
* plugin enabled: Claude Code offers to install both when the folder is
|
|
173
|
+
* trusted. `existing` is the starter's file, if any; nothing in it is dropped.
|
|
171
174
|
*/
|
|
172
175
|
export function withPluginMarketplace(existing) {
|
|
173
176
|
const settings = existing && typeof existing === 'object' ? { ...existing } : {};
|
|
@@ -177,6 +180,7 @@ export function withPluginMarketplace(existing) {
|
|
|
177
180
|
source: { source: 'github', repo: PLUGIN_MARKETPLACE.repo },
|
|
178
181
|
},
|
|
179
182
|
};
|
|
183
|
+
settings.enabledPlugins = { ...(settings.enabledPlugins ?? {}), [FIGMA_PLUGIN]: true };
|
|
180
184
|
return settings;
|
|
181
185
|
}
|
|
182
186
|
|