Skip to content

Commit

Permalink
added active line scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad Ghayour committed Jan 22, 2015
1 parent 7f5a253 commit e3dfb6b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
node_modules
codemirror
9 changes: 5 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ function generateThemeInfo(themeInfo, theme) {
root[themeInfo] = info;
}
}

root.children = {};
root.unsupported = {};
}
Expand Down Expand Up @@ -181,7 +180,7 @@ function generateStyles(styles, themeName, theme) {
}
}
else {
addToUnsupported(styles.scope, 'Specific styling');
addToUnsupported(styles.scope, styles);
}
}

Expand Down Expand Up @@ -235,10 +234,11 @@ function printCompletedMessage(themeName) {
* Read the given theme file and send it off to be parsed.
* Once completed, send off the root JSON to be written to CSS.
*/
function convertTheme(themeName, themePath, outputDirectory) {
function convertTheme(themeName, themePath, outputDirectory, debug) {
var srcTheme = fs.readFileSync(__dirname + themePath, 'utf8');
parseTheme(srcTheme, function(theme) {
extractStyles(themeName, theme);
if (debug) print(root);
writeFile(root, themeName, outputDirectory, printCompletedMessage);
});
}
Expand All @@ -264,7 +264,8 @@ if (process.argv.length > 1) {
var themeName = args[0];
var themePath = cleanPath(args[1]);
var outputDirectory = cleanPath(args[2]);
convertTheme(themeName, themePath, outputDirectory);
var debug = args[3] ? true : false;
convertTheme(themeName, themePath, outputDirectory, debug);
}


Expand Down
1 change: 1 addition & 0 deletions scopes/CodeMirrorSupportedScopes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'background': 'background',
'foreground': 'color',
'selection': ['CodeMirror-selected', 'background'],
'lineHighlight': ['CodeMirror-activeline-background', 'background'],
/*
* Specific styling with their associated CodeMirror
* selectors as the values
Expand Down

0 comments on commit e3dfb6b

Please sign in to comment.