remove unneeded exports to optimize loc
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Cline conversion profile for rule-transformer
|
||||
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
|
||||
|
||||
// Create cline profile using the base factory
|
||||
const clineProfile = createProfile({
|
||||
// Create and export cline profile using the base factory
|
||||
export const clineProfile = createProfile({
|
||||
name: 'cline',
|
||||
displayName: 'Cline',
|
||||
url: 'cline.bot',
|
||||
@@ -18,18 +18,3 @@ const clineProfile = createProfile({
|
||||
'cursor_rules.mdc': 'cline_rules.md'
|
||||
}
|
||||
});
|
||||
|
||||
// Export all the standard profile properties
|
||||
export const {
|
||||
conversionConfig,
|
||||
fileMap,
|
||||
globalReplacements,
|
||||
profileName,
|
||||
displayName,
|
||||
profileDir,
|
||||
rulesDir,
|
||||
mcpConfig,
|
||||
mcpConfigName,
|
||||
mcpConfigPath,
|
||||
getTargetRuleFilename
|
||||
} = clineProfile;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Cursor conversion profile for rule-transformer
|
||||
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
|
||||
|
||||
// Create cursor profile using the base factory
|
||||
const cursorProfile = createProfile({
|
||||
// Create and export cursor profile using the base factory
|
||||
export const cursorProfile = createProfile({
|
||||
name: 'cursor',
|
||||
displayName: 'Cursor',
|
||||
url: 'cursor.so',
|
||||
@@ -18,18 +18,3 @@ const cursorProfile = createProfile({
|
||||
'cursor_rules.mdc': 'cursor_rules.mdc' // Keep the same name for cursor
|
||||
}
|
||||
});
|
||||
|
||||
// Export all the standard profile properties
|
||||
export const {
|
||||
conversionConfig,
|
||||
fileMap,
|
||||
globalReplacements,
|
||||
profileName,
|
||||
displayName,
|
||||
profileDir,
|
||||
rulesDir,
|
||||
mcpConfig,
|
||||
mcpConfigName,
|
||||
mcpConfigPath,
|
||||
getTargetRuleFilename
|
||||
} = cursorProfile;
|
||||
|
||||
@@ -102,8 +102,8 @@ function onPostConvertRulesProfile(targetDir) {
|
||||
onAddRulesProfile(targetDir);
|
||||
}
|
||||
|
||||
// Create roo profile using the base factory
|
||||
const rooProfile = createProfile({
|
||||
// Create and export roo profile using the base factory
|
||||
export const rooProfile = createProfile({
|
||||
name: 'roo',
|
||||
displayName: 'Roo Code',
|
||||
url: 'roocode.com',
|
||||
@@ -123,20 +123,5 @@ const rooProfile = createProfile({
|
||||
onPostConvert: onPostConvertRulesProfile
|
||||
});
|
||||
|
||||
// Export all the standard profile properties and lifecycle functions
|
||||
export const {
|
||||
conversionConfig,
|
||||
fileMap,
|
||||
globalReplacements,
|
||||
profileName,
|
||||
displayName,
|
||||
profileDir,
|
||||
rulesDir,
|
||||
mcpConfig,
|
||||
mcpConfigName,
|
||||
mcpConfigPath,
|
||||
getTargetRuleFilename
|
||||
} = rooProfile;
|
||||
|
||||
// Export lifecycle functions separately to avoid naming conflicts
|
||||
export { onAddRulesProfile, onRemoveRulesProfile, onPostConvertRulesProfile };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Trae conversion profile for rule-transformer
|
||||
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
|
||||
|
||||
// Create trae profile using the base factory
|
||||
const traeProfile = createProfile({
|
||||
// Create and export trae profile using the base factory
|
||||
export const traeProfile = createProfile({
|
||||
name: 'trae',
|
||||
displayName: 'Trae',
|
||||
url: 'trae.ai',
|
||||
@@ -15,18 +15,3 @@ const traeProfile = createProfile({
|
||||
targetExtension: '.md',
|
||||
toolMappings: COMMON_TOOL_MAPPINGS.STANDARD // Trae uses standard tool names
|
||||
});
|
||||
|
||||
// Export all the standard profile properties
|
||||
export const {
|
||||
conversionConfig,
|
||||
fileMap,
|
||||
globalReplacements,
|
||||
profileName,
|
||||
displayName,
|
||||
profileDir,
|
||||
rulesDir,
|
||||
mcpConfig,
|
||||
mcpConfigName,
|
||||
mcpConfigPath,
|
||||
getTargetRuleFilename
|
||||
} = traeProfile;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Windsurf conversion profile for rule-transformer
|
||||
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
|
||||
|
||||
// Create windsurf profile using the base factory
|
||||
const windsurfProfile = createProfile({
|
||||
// Create and export windsurf profile using the base factory
|
||||
export const windsurfProfile = createProfile({
|
||||
name: 'windsurf',
|
||||
displayName: 'Windsurf',
|
||||
url: 'windsurf.com',
|
||||
@@ -15,18 +15,3 @@ const windsurfProfile = createProfile({
|
||||
targetExtension: '.md',
|
||||
toolMappings: COMMON_TOOL_MAPPINGS.STANDARD // Windsurf uses standard tool names
|
||||
});
|
||||
|
||||
// Export all the standard profile properties
|
||||
export const {
|
||||
conversionConfig,
|
||||
fileMap,
|
||||
globalReplacements,
|
||||
profileName,
|
||||
displayName,
|
||||
profileDir,
|
||||
rulesDir,
|
||||
mcpConfig,
|
||||
mcpConfigName,
|
||||
mcpConfigPath,
|
||||
getTargetRuleFilename
|
||||
} = windsurfProfile;
|
||||
|
||||
@@ -41,7 +41,11 @@ Also has references to .mdc files.`;
|
||||
|
||||
// Convert it
|
||||
const testClineRule = path.join(testDir, 'basic-terms.md');
|
||||
convertRuleToProfileRule(testCursorRule, testClineRule, clineProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testClineRule,
|
||||
clineProfile.clineProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testClineRule, 'utf8');
|
||||
@@ -72,7 +76,11 @@ alwaysApply: true
|
||||
|
||||
// Convert it
|
||||
const testClineRule = path.join(testDir, 'tool-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testClineRule, clineProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testClineRule,
|
||||
clineProfile.clineProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testClineRule, 'utf8');
|
||||
@@ -100,7 +108,11 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
|
||||
|
||||
// Convert it
|
||||
const testClineRule = path.join(testDir, 'file-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testClineRule, clineProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testClineRule,
|
||||
clineProfile.clineProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testClineRule, 'utf8');
|
||||
|
||||
@@ -45,7 +45,11 @@ Also has references to .mdc files.`;
|
||||
|
||||
// Convert it
|
||||
const testCursorOut = path.join(testDir, 'basic-terms.mdc');
|
||||
convertRuleToProfileRule(testCursorRule, testCursorOut, cursorProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testCursorOut,
|
||||
cursorProfile.cursorProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testCursorOut, 'utf8');
|
||||
@@ -76,7 +80,11 @@ alwaysApply: true
|
||||
|
||||
// Convert it
|
||||
const testCursorOut = path.join(testDir, 'tool-refs.mdc');
|
||||
convertRuleToProfileRule(testCursorRule, testCursorOut, cursorProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testCursorOut,
|
||||
cursorProfile.cursorProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testCursorOut, 'utf8');
|
||||
@@ -106,7 +114,11 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
|
||||
|
||||
// Convert it
|
||||
const testCursorOut = path.join(testDir, 'file-refs.mdc');
|
||||
convertRuleToProfileRule(testCursorRule, testCursorOut, cursorProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testCursorOut,
|
||||
cursorProfile.cursorProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testCursorOut, 'utf8');
|
||||
|
||||
@@ -45,7 +45,11 @@ Also has references to .mdc files.`;
|
||||
|
||||
// Convert it
|
||||
const testRooRule = path.join(testDir, 'basic-terms.md');
|
||||
convertRuleToProfileRule(testCursorRule, testRooRule, rooProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testRooRule,
|
||||
rooProfile.rooProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testRooRule, 'utf8');
|
||||
@@ -76,7 +80,11 @@ alwaysApply: true
|
||||
|
||||
// Convert it
|
||||
const testRooRule = path.join(testDir, 'tool-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testRooRule, rooProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testRooRule,
|
||||
rooProfile.rooProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testRooRule, 'utf8');
|
||||
@@ -104,7 +112,11 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
|
||||
|
||||
// Convert it
|
||||
const testRooRule = path.join(testDir, 'file-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testRooRule, rooProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testRooRule,
|
||||
rooProfile.rooProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testRooRule, 'utf8');
|
||||
@@ -122,7 +134,7 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
|
||||
const assetRule = path.join(assetsRulesDir, 'dev_workflow.mdc');
|
||||
fs.writeFileSync(assetRule, 'dummy');
|
||||
// Should create .roo/rules and call post-processing
|
||||
convertAllRulesToProfileRules(testDir, rooProfile);
|
||||
convertAllRulesToProfileRules(testDir, rooProfile.rooProfile);
|
||||
// Check for post-processing artifacts, e.g., rules-* folders or extra files
|
||||
const rooDir = path.join(testDir, '.roo');
|
||||
const found = fs.readdirSync(rooDir).some((f) => f.startsWith('rules-'));
|
||||
|
||||
@@ -41,7 +41,11 @@ Also has references to .mdc files.`;
|
||||
|
||||
// Convert it
|
||||
const testTraeRule = path.join(testDir, 'basic-terms.md');
|
||||
convertRuleToProfileRule(testCursorRule, testTraeRule, traeProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testTraeRule,
|
||||
traeProfile.traeProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testTraeRule, 'utf8');
|
||||
@@ -72,7 +76,11 @@ alwaysApply: true
|
||||
|
||||
// Convert it
|
||||
const testTraeRule = path.join(testDir, 'tool-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testTraeRule, traeProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testTraeRule,
|
||||
traeProfile.traeProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testTraeRule, 'utf8');
|
||||
@@ -100,7 +108,11 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
|
||||
|
||||
// Convert it
|
||||
const testTraeRule = path.join(testDir, 'file-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testTraeRule, traeProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testTraeRule,
|
||||
traeProfile.traeProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testTraeRule, 'utf8');
|
||||
|
||||
@@ -41,7 +41,11 @@ Also has references to .mdc files.`;
|
||||
|
||||
// Convert it
|
||||
const testWindsurfRule = path.join(testDir, 'basic-terms.md');
|
||||
convertRuleToProfileRule(testCursorRule, testWindsurfRule, windsurfProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testWindsurfRule,
|
||||
windsurfProfile.windsurfProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testWindsurfRule, 'utf8');
|
||||
@@ -72,7 +76,11 @@ alwaysApply: true
|
||||
|
||||
// Convert it
|
||||
const testWindsurfRule = path.join(testDir, 'tool-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testWindsurfRule, windsurfProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testWindsurfRule,
|
||||
windsurfProfile.windsurfProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testWindsurfRule, 'utf8');
|
||||
@@ -100,7 +108,11 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
|
||||
|
||||
// Convert it
|
||||
const testWindsurfRule = path.join(testDir, 'file-refs.md');
|
||||
convertRuleToProfileRule(testCursorRule, testWindsurfRule, windsurfProfile);
|
||||
convertRuleToProfileRule(
|
||||
testCursorRule,
|
||||
testWindsurfRule,
|
||||
windsurfProfile.windsurfProfile
|
||||
);
|
||||
|
||||
// Read the converted file
|
||||
const convertedContent = fs.readFileSync(testWindsurfRule, 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user