@se-studio/project-build 1.3.0 → 1.3.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/CHANGELOG.md +12 -0
- package/README.md +8 -14
- package/dist/marketing-routes.mjs +28 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @se-studio/project-build
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1a4de9f: Customer docs and templates describe one way to get skills into a site: an exact `@se-studio/skills` devDependency linked by `skills-npm --yes` in `prepare`. They no longer tell sites to run `skills update`, `skills@latest`, a per-repo `sync-skills.sh` or third-party packs, or to strip `AGENTS.md` after a sync. The bundled cms-edit setup skill matches.
|
|
8
|
+
|
|
9
|
+
## 1.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 99cfb6c: `generate-marketing-routes --write` keeps generated person pages when a people path has no index page.
|
|
14
|
+
|
|
3
15
|
## 1.3.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -89,27 +89,21 @@ pnpm skills:sync
|
|
|
89
89
|
|
|
90
90
|
See [`packages/skills/README.md`](../skills/README.md) for frontmatter rules.
|
|
91
91
|
|
|
92
|
-
**In
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
npx skills add @se-studio/skills
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Add to your project’s `package.json` to auto-sync on `pnpm install` (skips on CI/Vercel):
|
|
92
|
+
**In a customer site**, add the package as an exact-version devDependency and link its skills in `prepare` (skipped on CI/Vercel):
|
|
99
93
|
|
|
100
94
|
```json
|
|
101
95
|
"devDependencies": {
|
|
102
|
-
"@se-studio/skills": "
|
|
103
|
-
"skills-npm": "^
|
|
96
|
+
"@se-studio/skills": "<exact version>",
|
|
97
|
+
"skills-npm": "^4.1.0"
|
|
104
98
|
},
|
|
105
99
|
"scripts": {
|
|
106
|
-
"prepare": "node -e \"if(process.env.VERCEL||process.env.CI)process.exit(0);process.exit(1)\" || (
|
|
107
|
-
"skills:sync": "bash scripts/sync-skills.sh",
|
|
108
|
-
"skills:update": "npx -y skills@latest update -y"
|
|
100
|
+
"prepare": "node -e \"if(process.env.VERCEL||process.env.CI)process.exit(0);process.exit(1)\" || (git config core.hooksPath .githooks && skills-npm --yes)"
|
|
109
101
|
}
|
|
110
102
|
```
|
|
111
103
|
|
|
112
|
-
|
|
104
|
+
`skills-npm --yes` links the package's skills from `node_modules` into `.agents/skills` (and the agent directories). The version is pinned by the lockfile, so the skills match the installed package. Do not run `skills update` or `skills@latest`, do not keep a per-repo `scripts/sync-skills.sh`, and do not add third-party skill packs (a skill a site needs goes into `@se-studio/skills` through core). Track `skills-npm-lock.json`; ignore the linked skill directories (`.agents/skills`, `.claude/skills`, `.cursor/skills`, `.grok/skills`) except the repo's own authored skills. Use the `dir/*` form with `!dir/<name>` exceptions (as eagle-website does), not `dir/`, which cannot take exceptions. Hooks come from `customer-guardrails/` (see `packages/skills/references/agent-session/customer-guardrails/README.md`); replace `git config core.hooksPath .githooks` with `husky` if the repo uses husky.
|
|
105
|
+
|
|
106
|
+
`npx skills add @se-studio/skills` is only for a one-off project that does not depend on the package.
|
|
113
107
|
|
|
114
108
|
## API Reference
|
|
115
109
|
|
|
@@ -148,7 +142,7 @@ setup-colours
|
|
|
148
142
|
```
|
|
149
143
|
|
|
150
144
|
#### `seskills sync [target-dir]`
|
|
151
|
-
Deprecated.
|
|
145
|
+
Deprecated. Depend on `@se-studio/skills` and link it with `skills-npm` (see above). See `packages/skills/` for the canonical skill sources.
|
|
152
146
|
|
|
153
147
|
For detailed JSDoc documentation on all exports, see the TypeScript declaration files (`.d.ts`) in the package.
|
|
154
148
|
|
|
@@ -604,9 +604,35 @@ function supportDrift(appRoot, config) {
|
|
|
604
604
|
return drift;
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
+
/**
|
|
608
|
+
* A people base with `index: false` has no `people/page.ts`. The person
|
|
609
|
+
* pages live under that folder, so the folder itself must stay.
|
|
610
|
+
*
|
|
611
|
+
* @param {string} dir
|
|
612
|
+
*/
|
|
613
|
+
function hasGeneratedPage(dir) {
|
|
614
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
615
|
+
const full = path.join(dir, entry.name);
|
|
616
|
+
if (entry.isDirectory()) {
|
|
617
|
+
if (hasGeneratedPage(full)) {
|
|
618
|
+
return true;
|
|
619
|
+
}
|
|
620
|
+
continue;
|
|
621
|
+
}
|
|
622
|
+
if (!entry.name.endsWith('.ts') && !entry.name.endsWith('.tsx')) {
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
if (fs.readFileSync(full, 'utf8').startsWith(GENERATED_MARK)) {
|
|
626
|
+
return true;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
return false;
|
|
630
|
+
}
|
|
631
|
+
|
|
607
632
|
/**
|
|
608
633
|
* Legacy hand routes the CMS generator replaces. A folder is removed only
|
|
609
|
-
* when
|
|
634
|
+
* when nothing in it was written by this generator. A generated person page
|
|
635
|
+
* with no index page is enough to keep `people/`.
|
|
610
636
|
*
|
|
611
637
|
* @param {string} appRoot
|
|
612
638
|
* @returns {string[]}
|
|
@@ -626,11 +652,7 @@ function removeStaleHandRoutes(appRoot) {
|
|
|
626
652
|
if (!fs.existsSync(dir)) {
|
|
627
653
|
continue;
|
|
628
654
|
}
|
|
629
|
-
|
|
630
|
-
.map((name) => path.join(dir, name))
|
|
631
|
-
.find((file) => fs.existsSync(file));
|
|
632
|
-
const text = page ? fs.readFileSync(page, 'utf8') : '';
|
|
633
|
-
if (text.startsWith(GENERATED_MARK)) {
|
|
655
|
+
if (hasGeneratedPage(dir)) {
|
|
634
656
|
continue;
|
|
635
657
|
}
|
|
636
658
|
fs.rmSync(dir, { recursive: true, force: true });
|