create-rulecad 0.2.1 → 0.3.1
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.mjs +1 -1
- package/package.json +1 -1
- package/template/AGENTS.md +2 -2
package/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ fs.renameSync(path.join(dir, 'gitignore'), path.join(dir, '.gitignore')); // npm
|
|
|
20
20
|
const readme = path.join(dir, 'README.md');
|
|
21
21
|
fs.writeFileSync(readme, fs.readFileSync(readme, 'utf8').replaceAll('NAME', name));
|
|
22
22
|
// $RULECAD_LOCAL: a rulecad checkout to use instead of npm (to try unpublished changes)
|
|
23
|
-
const from = (pkg) => (process.env.RULECAD_LOCAL ? `file:${path.join(path.resolve(process.env.RULECAD_LOCAL), 'packages', pkg)}` : '^0.
|
|
23
|
+
const from = (pkg) => (process.env.RULECAD_LOCAL ? `file:${path.join(path.resolve(process.env.RULECAD_LOCAL), 'packages', pkg)}` : '^0.3.0');
|
|
24
24
|
fs.writeFileSync(path.join(dir, 'package.json'), `${JSON.stringify({
|
|
25
25
|
name, private: true, type: 'module',
|
|
26
26
|
scripts: { check: 'cad check home/soap-tray' },
|
package/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -50,8 +50,8 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
50
50
|
- A part is named in fits as `<item>.<part>`; an object that returns one unnamed shape has one part, `body`.
|
|
51
51
|
- A gap fit can't tell whether holes line up. Where a board screws into a part, add a holes fit
|
|
52
52
|
(`{ "holes": "pcb.board", "into": "case.body", "depth": "m2.insert_length" }`).
|
|
53
|
-
- A part built around another (a case around its board) reads it: `"uses": ["
|
|
54
|
-
`
|
|
53
|
+
- A part built around another (a case around its board) reads it: `"uses": ["macropad/pcb"]`, then
|
|
54
|
+
`pcb.board_w` and `v.pcb.board_holes`. Never copy another object's numbers by hand.
|
|
55
55
|
|
|
56
56
|
## Circuit boards
|
|
57
57
|
- `"engine": "pcb"` in the .json; `main(v)` returns a board built with `v.pcb` (see @rulecad/pcb's README).
|