-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This program was a feature-lacking build tool. So I decided to convert it to a ninja generator that can track file additions and deletions.
- Loading branch information
Showing
4 changed files
with
81 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var glob = require('glob'), | ||
fs = require('fs'), | ||
args = process.argv.slice(2), | ||
cwd = args[2] || process.cwd(); | ||
|
||
// construct search patterns | ||
var patterns = args[0].split(' '), | ||
pattern = patterns.length > 1 ? '{' + patterns.join(',') + '}' : patterns[0]; | ||
|
||
// collect files that match pattern | ||
var files = glob.sync(pattern, {cwd: cwd}).join('\n'); | ||
|
||
// update file list in output if they don't match | ||
var outpath = args[1]; | ||
fs.readFile(outpath, {encoding: 'utf8'}, function(_, oldfiles) { | ||
if (oldfiles !== files) { | ||
fs.writeFileSync(outpath, files); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
{ | ||
"boar_repo": "RawAssets", | ||
"target_dir": "Assets", | ||
"converters" : [ | ||
{ | ||
"pattern": "**/*.psd", | ||
"tag": "images", | ||
"commands": "convert \"%i[0]\" \"%n.png\"" | ||
} | ||
] | ||
"**/*.psd": { | ||
"$filename.png": "convert \"$in[0]\" -resize 50% \"$out\"", | ||
"[email protected]": "convert \"$in[0]\" \"$out\"" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters