framer-code-link 0.11.0 → 0.12.0
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/dist/index.mjs +24 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1262,7 +1262,8 @@ var Installer = class {
|
|
|
1262
1262
|
this.ensurePrettierConfig(),
|
|
1263
1263
|
this.ensureFramerDeclarations(),
|
|
1264
1264
|
this.ensurePackageJson(),
|
|
1265
|
-
this.ensureSkills()
|
|
1265
|
+
this.ensureSkills(),
|
|
1266
|
+
this.ensureGitignore()
|
|
1266
1267
|
]);
|
|
1267
1268
|
Promise.resolve().then(async () => {
|
|
1268
1269
|
await this.ensureReact18Types();
|
|
@@ -1416,6 +1417,27 @@ declare module "*.json"
|
|
|
1416
1417
|
async ensureSkills() {
|
|
1417
1418
|
await installSkills(this.projectDir);
|
|
1418
1419
|
}
|
|
1420
|
+
async ensureGitignore() {
|
|
1421
|
+
const gitignorePath = path.join(this.projectDir, ".gitignore");
|
|
1422
|
+
try {
|
|
1423
|
+
await fs.access(gitignorePath);
|
|
1424
|
+
debug(".gitignore already exists");
|
|
1425
|
+
return;
|
|
1426
|
+
} catch {}
|
|
1427
|
+
const content = [
|
|
1428
|
+
"node_modules/",
|
|
1429
|
+
"",
|
|
1430
|
+
"# Framer Code Link",
|
|
1431
|
+
".framer-sync-state.json",
|
|
1432
|
+
".skills/",
|
|
1433
|
+
".agents/skills/",
|
|
1434
|
+
".claude/skills/",
|
|
1435
|
+
".cursor/skills/",
|
|
1436
|
+
""
|
|
1437
|
+
].join("\n");
|
|
1438
|
+
await fs.writeFile(gitignorePath, content);
|
|
1439
|
+
debug("Created .gitignore");
|
|
1440
|
+
}
|
|
1419
1441
|
async ensureReact18Types() {
|
|
1420
1442
|
const reactTypesDir = path.join(this.projectDir, "node_modules/@types/react");
|
|
1421
1443
|
const reactFiles = [
|
|
@@ -1878,7 +1900,7 @@ function toPackageName(name) {
|
|
|
1878
1900
|
return name.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/^-+|-+$/g, "").replace(/-+/g, "-");
|
|
1879
1901
|
}
|
|
1880
1902
|
function toDirectoryName(name) {
|
|
1881
|
-
return name.replace(/[^a-zA-Z0-9-
|
|
1903
|
+
return name.replace(/[^a-zA-Z0-9-]/g, "-").replace(/^-+|-+$/g, "").replace(/-+/g, "-");
|
|
1882
1904
|
}
|
|
1883
1905
|
async function getProjectHashFromCwd() {
|
|
1884
1906
|
try {
|