heymark 1.2.0 → 2.0.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.
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
-
6
- const SKILLS_DIR = path.join(".agent", "skills");
7
- const SKILL_FILE_NAME = "SKILL.md";
8
-
9
- function getSkillDir(projectRoot, ruleName) {
10
- return path.join(projectRoot, SKILLS_DIR, ruleName);
11
- }
12
-
13
- function createSkillContent(rule) {
14
- const frontmatterLines = [
15
- "---",
16
- `name: ${rule.name}`,
17
- `description: "${rule.description}"`,
18
- "---",
19
- ];
20
-
21
- return `${frontmatterLines.join("\n")}\n\n${rule.body}\n`;
22
- }
23
-
24
- module.exports = {
25
- name: "Antigravity",
26
- output: ".agent/skills/*/SKILL.md",
27
-
28
- generate(rules, projectRoot) {
29
- for (const rule of rules) {
30
- const skillDir = getSkillDir(projectRoot, rule.name);
31
- fs.mkdirSync(skillDir, { recursive: true });
32
- const filePath = path.join(skillDir, SKILL_FILE_NAME);
33
- const content = createSkillContent(rule);
34
- fs.writeFileSync(filePath, content, "utf8");
35
- }
36
-
37
- return rules.length;
38
- },
39
-
40
- clean(ruleNames, projectRoot) {
41
- const cleaned = [];
42
-
43
- for (const ruleName of ruleNames) {
44
- const skillDir = getSkillDir(projectRoot, ruleName);
45
- if (fs.existsSync(skillDir)) {
46
- fs.rmSync(skillDir, { recursive: true });
47
- cleaned.push(path.join(SKILLS_DIR, ruleName));
48
- }
49
- }
50
-
51
- return cleaned;
52
- },
53
- };
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
-
6
- const SKILLS_DIR = path.join(".claude", "skills");
7
- const SKILL_FILE_NAME = "SKILL.md";
8
-
9
- function getSkillDir(projectRoot, ruleName) {
10
- return path.join(projectRoot, SKILLS_DIR, ruleName);
11
- }
12
-
13
- function createSkillContent(rule) {
14
- const frontmatterLines = [
15
- "---",
16
- `name: ${rule.name}`,
17
- `description: "${rule.description}"`,
18
- "---",
19
- ];
20
-
21
- return `${frontmatterLines.join("\n")}\n\n${rule.body}\n`;
22
- }
23
-
24
- module.exports = {
25
- name: "Claude Code",
26
- output: ".claude/skills/*/SKILL.md",
27
-
28
- generate(rules, projectRoot) {
29
- for (const rule of rules) {
30
- const skillDir = getSkillDir(projectRoot, rule.name);
31
- fs.mkdirSync(skillDir, { recursive: true });
32
- const filePath = path.join(skillDir, SKILL_FILE_NAME);
33
- const content = createSkillContent(rule);
34
- fs.writeFileSync(filePath, content, "utf8");
35
- }
36
-
37
- return rules.length;
38
- },
39
-
40
- clean(ruleNames, projectRoot) {
41
- const cleaned = [];
42
-
43
- for (const ruleName of ruleNames) {
44
- const skillDir = getSkillDir(projectRoot, ruleName);
45
- if (fs.existsSync(skillDir)) {
46
- fs.rmSync(skillDir, { recursive: true });
47
- cleaned.push(path.join(SKILLS_DIR, ruleName));
48
- }
49
- }
50
-
51
- return cleaned;
52
- },
53
- };
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
-
6
- const SKILLS_DIR = path.join(".agents", "skills");
7
- const SKILL_FILE_NAME = "SKILL.md";
8
-
9
- function getSkillDir(projectRoot, ruleName) {
10
- return path.join(projectRoot, SKILLS_DIR, ruleName);
11
- }
12
-
13
- function createSkillContent(rule) {
14
- const frontmatterLines = [
15
- "---",
16
- `name: ${rule.name}`,
17
- `description: "${rule.description}"`,
18
- "---",
19
- ];
20
-
21
- return `${frontmatterLines.join("\n")}\n\n${rule.body}\n`;
22
- }
23
-
24
- module.exports = {
25
- name: "OpenAI Codex",
26
- output: ".agents/skills/*/SKILL.md",
27
-
28
- generate(rules, projectRoot) {
29
- for (const rule of rules) {
30
- const skillDir = getSkillDir(projectRoot, rule.name);
31
- fs.mkdirSync(skillDir, { recursive: true });
32
- const filePath = path.join(skillDir, SKILL_FILE_NAME);
33
- const content = createSkillContent(rule);
34
- fs.writeFileSync(filePath, content, "utf8");
35
- }
36
-
37
- return rules.length;
38
- },
39
-
40
- clean(ruleNames, projectRoot) {
41
- const cleaned = [];
42
-
43
- for (const ruleName of ruleNames) {
44
- const skillDir = getSkillDir(projectRoot, ruleName);
45
- if (fs.existsSync(skillDir)) {
46
- fs.rmSync(skillDir, { recursive: true });
47
- cleaned.push(path.join(SKILLS_DIR, ruleName));
48
- }
49
- }
50
-
51
- return cleaned;
52
- },
53
- };
@@ -1,65 +0,0 @@
1
- "use strict";
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
-
6
- const INSTRUCTIONS_DIR = path.join(".github", "instructions");
7
- const FILE_SUFFIX = ".instructions.md";
8
- const DEFAULT_GLOB = "**";
9
-
10
- function getInstructionPath(projectRoot, ruleName) {
11
- return path.join(projectRoot, INSTRUCTIONS_DIR, `${ruleName}${FILE_SUFFIX}`);
12
- }
13
-
14
- function normalizeGlobs(globsValue) {
15
- if (!globsValue) {
16
- return [DEFAULT_GLOB];
17
- }
18
-
19
- const globs = globsValue
20
- .split(",")
21
- .map((glob) => glob.trim())
22
- .filter(Boolean);
23
-
24
- return globs.length > 0 ? globs : [DEFAULT_GLOB];
25
- }
26
-
27
- function createInstructionContent(rule) {
28
- const applyToLines = normalizeGlobs(rule.globs)
29
- .map((glob) => ` - "${glob}"`)
30
- .join("\n");
31
- const header = `applyTo:\n${applyToLines}\n---`;
32
- return `${header}\n\n${rule.body}\n`;
33
- }
34
-
35
- module.exports = {
36
- name: "GitHub Copilot",
37
- output: ".github/instructions/*.instructions.md",
38
-
39
- generate(rules, projectRoot) {
40
- const destDir = path.join(projectRoot, INSTRUCTIONS_DIR);
41
- fs.mkdirSync(destDir, { recursive: true });
42
-
43
- for (const rule of rules) {
44
- const filePath = getInstructionPath(projectRoot, rule.name);
45
- const content = createInstructionContent(rule);
46
- fs.writeFileSync(filePath, content, "utf8");
47
- }
48
-
49
- return rules.length;
50
- },
51
-
52
- clean(ruleNames, projectRoot) {
53
- const cleaned = [];
54
-
55
- for (const ruleName of ruleNames) {
56
- const filePath = getInstructionPath(projectRoot, ruleName);
57
- if (fs.existsSync(filePath)) {
58
- fs.unlinkSync(filePath);
59
- cleaned.push(path.join(INSTRUCTIONS_DIR, `${ruleName}${FILE_SUFFIX}`));
60
- }
61
- }
62
-
63
- return cleaned;
64
- },
65
- };
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
-
6
- const RULES_DIR = path.join(".cursor", "rules");
7
- const FILE_SUFFIX = ".mdc";
8
-
9
- function getRulePath(projectRoot, ruleName) {
10
- return path.join(projectRoot, RULES_DIR, `${ruleName}${FILE_SUFFIX}`);
11
- }
12
-
13
- function createRuleContent(rule) {
14
- const frontmatterLines = ["---", `description: "${rule.description}"`];
15
- if (rule.globs) {
16
- frontmatterLines.push(`globs: "${rule.globs}"`);
17
- }
18
- frontmatterLines.push(`alwaysApply: ${rule.alwaysApply}`);
19
- frontmatterLines.push("---");
20
-
21
- return `${frontmatterLines.join("\n")}\n\n${rule.body}\n`;
22
- }
23
-
24
- module.exports = {
25
- name: "Cursor",
26
- output: ".cursor/rules/*.mdc",
27
-
28
- generate(rules, projectRoot) {
29
- const destDir = path.join(projectRoot, RULES_DIR);
30
- fs.mkdirSync(destDir, { recursive: true });
31
-
32
- for (const rule of rules) {
33
- fs.writeFileSync(getRulePath(projectRoot, rule.name), createRuleContent(rule), "utf8");
34
- }
35
-
36
- return rules.length;
37
- },
38
-
39
- clean(ruleNames, projectRoot) {
40
- const cleaned = [];
41
-
42
- for (const ruleName of ruleNames) {
43
- const filePath = getRulePath(projectRoot, ruleName);
44
- if (fs.existsSync(filePath)) {
45
- fs.unlinkSync(filePath);
46
- cleaned.push(path.join(RULES_DIR, `${ruleName}${FILE_SUFFIX}`));
47
- }
48
- }
49
-
50
- return cleaned;
51
- },
52
- };