File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ var fs = require('fs');
1313var plist = require ( 'fast-plist' ) ;
1414
1515exports . 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
4953if ( 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}
You can’t perform that action at this time.
0 commit comments