keep mdc extension for cursor
This commit is contained in:
@@ -202,7 +202,7 @@ function convertAllCursorRulesToBrandRules(projectDir, profile) {
|
|||||||
const sourcePath = path.join(cursorRulesDir, file);
|
const sourcePath = path.join(cursorRulesDir, file);
|
||||||
|
|
||||||
// Determine target file name (either from mapping or by replacing extension)
|
// Determine target file name (either from mapping or by replacing extension)
|
||||||
const targetFilename = fileMap[file] || file.replace('.mdc', '.md');
|
const targetFilename = fileMap[file] || file;
|
||||||
const targetPath = path.join(brandRulesDir, targetFilename);
|
const targetPath = path.join(brandRulesDir, targetFilename);
|
||||||
|
|
||||||
// Convert the file
|
// Convert the file
|
||||||
|
|||||||
@@ -6,11 +6,7 @@ const rulesDir = '.cursor/rules';
|
|||||||
|
|
||||||
// File name mapping (specific files with naming changes)
|
// File name mapping (specific files with naming changes)
|
||||||
const fileMap = {
|
const fileMap = {
|
||||||
'cursor_rules.mdc': 'cursor_rules.md',
|
// No explicit mappings; keep original .mdc filenames
|
||||||
'dev_workflow.mdc': 'dev_workflow.md',
|
|
||||||
'self_improve.mdc': 'self_improve.md',
|
|
||||||
'taskmaster.mdc': 'taskmaster.md'
|
|
||||||
// Add other mappings as needed
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const globalReplacements = [
|
const globalReplacements = [
|
||||||
@@ -25,7 +21,10 @@ const globalReplacements = [
|
|||||||
{ from: /\bsearch tool\b/gi, to: 'search tool' },
|
{ from: /\bsearch tool\b/gi, to: 'search tool' },
|
||||||
{ from: /\bSearch Tool\b/g, to: 'Search Tool' },
|
{ from: /\bSearch Tool\b/g, to: 'Search Tool' },
|
||||||
// 3. Handle basic terms (with case handling)
|
// 3. Handle basic terms (with case handling)
|
||||||
{ from: /\bcursor\b/gi, to: (match) => (match.charAt(0) === 'C' ? 'Cursor' : 'cursor') },
|
{
|
||||||
|
from: /\bcursor\b/gi,
|
||||||
|
to: (match) => (match.charAt(0) === 'C' ? 'Cursor' : 'cursor')
|
||||||
|
},
|
||||||
{ from: /Cursor/g, to: 'Cursor' },
|
{ from: /Cursor/g, to: 'Cursor' },
|
||||||
{ from: /CURSOR/g, to: 'CURSOR' },
|
{ from: /CURSOR/g, to: 'CURSOR' },
|
||||||
// 4. Handle file extensions
|
// 4. Handle file extensions
|
||||||
@@ -49,7 +48,7 @@ const conversionConfig = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
// File extension replacements
|
// File extension replacements
|
||||||
fileExtensions: [{ from: /\.mdc\b/g, to: '.md' }],
|
fileExtensions: [],
|
||||||
|
|
||||||
// Documentation URL replacements
|
// Documentation URL replacements
|
||||||
docUrls: [
|
docUrls: [
|
||||||
|
|||||||
Reference in New Issue
Block a user