Skip to content

Commit

Permalink
cleanup tools directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Sep 9, 2014
1 parent dbeeea2 commit 1bce1b2
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile.dryice.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ function generateThemesModule(themes) {
function addSnippetFile(modeName) {
var snippetFilePath = ACE_HOME + "/lib/ace/snippets/" + modeName;
if (!fs.existsSync(snippetFilePath + ".js")) {
copy.file(ACE_HOME + "/tool/snippets.tmpl.js", snippetFilePath + ".js", function(t) {
copy.file(ACE_HOME + "/tool/templates/snippets.js", snippetFilePath + ".js", function(t) {
return t.replace(/%modeName%/g, modeName);
});
}
Expand Down
6 changes: 3 additions & 3 deletions tool/add_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fs.writeFileSync(demoFilePath, "TODO add a nice demo!", "utf8");
console.log("Created demo file at: " + path.normalize(demoFilePath));

/** mode **/
var template = fs.readFileSync(__dirname + "/mode.tmpl.js", "utf8");
var template = fs.readFileSync(__dirname + "/templates/mode.js", "utf8");
var modePath = lib.AceLib + "ace/mode/" + name + ".js";
var text = lib.fillTemplate(template, {
languageHighlightFilename: name,
Expand All @@ -35,7 +35,7 @@ fs.writeFileSync(modePath, text);
console.log("Created mode file at: " + path.normalize(modePath));

/** highlight rules **/
template = fs.readFileSync(__dirname + "/mode_highlight_rules.tmpl.js", "utf8");
template = fs.readFileSync(__dirname + "/templates/highlight_rules.js", "utf8");
var hlPath = lib.AceLib + "ace/mode/" + name + "_highlight_rules.js";
template = template.replace(/\/\* THIS[\s\S]*?\*{3}\/\s*/, "");
text = lib.fillTemplate(template, {
Expand All @@ -60,7 +60,7 @@ fs.writeFileSync(hlPath, text);
console.log("Created mode file at: " + path.normalize(hlPath));

/** snippets **/
template = fs.readFileSync(__dirname + "/tmsnippets.tmpl.js", "utf8");
template = fs.readFileSync(__dirname + "/templates/snippets.js", "utf8");
var snipetsPath = lib.AceLib + "ace/snippets/" + name + ".js";
text = lib.fillTemplate(template, {
languagename: name,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tool/tmlanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ function extractPatterns(tmRules) {


// cli stuff
var modeTemplate = fs.readFileSync(__dirname + "/mode.tmpl.js", "utf8");
var modeHighlightTemplate = fs.readFileSync(__dirname + "/mode_highlight_rules.tmpl.js", "utf8");
var modeTemplate = fs.readFileSync(__dirname + "/templates/mode.js", "utf8");
var modeHighlightTemplate = fs.readFileSync(__dirname + "/templates/highlight_rules.js", "utf8");

function convertLanguageFile(name) {
var path = /^(\/|\w:)/.test(name) ? name : process.cwd() + "/" + name
Expand Down
4 changes: 2 additions & 2 deletions tool/tmtheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ function quoteString(str) {
return '"' + str.replace(/\\/, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\\n") + '"';
}

var cssTemplate = fs.readFileSync(__dirname + "/theme.tmpl.css", "utf8");
var jsTemplate = fs.readFileSync(__dirname + "/theme.tmpl.js", "utf8");
var cssTemplate = fs.readFileSync(__dirname + "/templates/theme.css", "utf8");
var jsTemplate = fs.readFileSync(__dirname + "/templates/theme.js", "utf8");

function normalizeStylesheet(rules) {
for (var i = rules.length; i--; ) {
Expand Down

0 comments on commit 1bce1b2

Please sign in to comment.