Skip to content

Commit 9127a4a

Browse files
committed
add console logging.
1 parent 134d785 commit 9127a4a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/scripts/build-grammar.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ var fs = require('fs');
1313
var plist = require('fast-plist');
1414

1515
exports.update = function (tmlPath, dest) {
16-
16+
console.log('... Reading source file.');
1717
var content = fs.readFileSync(tmlPath).toString();
1818

19+
console.log('... Parsing content.');
1920
var grammar;
2021
grammar = plist.parse(content);
2122

23+
console.log('... Building contents.');
2224
let result = {
2325
information_for_contributors: [
2426
'This file has been converted from source and may not be in line with the official build.',
@@ -40,12 +42,15 @@ exports.update = function (tmlPath, dest) {
4042

4143
var dirname = path.dirname(dest);
4244
if (!fs.existsSync(dirname)) {
45+
console.log('... Creating directory: ' + dirname);
4346
fs.mkdirSync(dirname);
4447
}
4548

4649
fs.writeFileSync(dest, JSON.stringify(result, null, '\t'));
50+
console.log('[Finished] File written to: ' + dest);
4751
};
4852

4953
if (path.basename(process.argv[1]) === 'build-grammar.js') {
54+
console.log('[Starting] Converting ' + process.argv[2] + ' to json.');
5055
exports.update(process.argv[2], process.argv[3]);
5156
}

0 commit comments

Comments
 (0)