Skip to content

Commit

Permalink
added README
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad Ghayour committed Jan 22, 2015
1 parent 9c655e1 commit 26fe3e2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
CodeMirror AceEditor Themes Generator
====

Generate Code Mirror and Ace Editor themes with the help of a sleek GUI and/or from the thousands of available themes for Sublime Text and Text Mate.

This project is in its early stages and will continue to grow with new features.

Some of the parsing from SublimeText and TextMate's XML to CodeMirror and AceEditor's CSS are not one-to-one, as they each have different levels and specificity for their selectors. That said, this tool should provide you a nice basis to help make CodeMirror and AceEditor themes.

If something is not working or you would like a new feature, please use the issues page.


## Installation

You can simply fork and clone (or download) the repo into your local directory:

```
$ git clone https://github.com/FarhadG/codeMirror-aceEditor-themes-generator
$ cd codeMirror-aceEditor-themes-generator
$ npm install
```


## Usage

After installing the package, you can run the `main.js` script to convert SublimeText's & TextMate's XML to CodeMirror's CSS. The script takes 2 arguments (3rd is optional).

1. Theme name: Should be the same one provided to CodeMirror's theme API option, so that the correct namespacing applies over the CSS classes.
2. The source file path: The relative path to the source file.
3. The destination file path: The relative path for the output directory/file.

```
$ node main.js [themeName] [pathToSrcFile] [pathToDestinationFile(optional)]
```


## GUI Interface

Here's the <a href="http:https://tmtheme-editor.herokuapp.com/" target="_blank">LINK</a> for making SublimeText and TextMate with a visual interface. After saving the file, you can, then, take the file and run the generator script for converting the XML to CSS.


## Options

I'll be adding more meshing features; that said, if you'd like a feature, let me know so that I'll try and implement it into future updates.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function cleanPath(path) {
if (process.argv.length > 1) {
var args = process.argv.splice(2);
if (args.length < 2) {
console.error('Usage: node main.js [themeName, pathToDirection, outputDirectory (OPTIONAL)]');
console.error('Usage: [themeName] [pathToSrcFile] [pathToDestinationFile(optional)]');
process.exit(1);
}
var themeName = args[0];
Expand Down

0 comments on commit 26fe3e2

Please sign in to comment.