File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ var fs = require('fs');
13
13
var plist = require ( 'fast-plist' ) ;
14
14
15
15
exports . update = function ( tmlPath , dest ) {
16
-
16
+ console . log ( '... Reading source file.' ) ;
17
17
var content = fs . readFileSync ( tmlPath ) . toString ( ) ;
18
18
19
+ console . log ( '... Parsing content.' ) ;
19
20
var grammar ;
20
21
grammar = plist . parse ( content ) ;
21
22
23
+ console . log ( '... Building contents.' ) ;
22
24
let result = {
23
25
information_for_contributors : [
24
26
'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) {
40
42
41
43
var dirname = path . dirname ( dest ) ;
42
44
if ( ! fs . existsSync ( dirname ) ) {
45
+ console . log ( '... Creating directory: ' + dirname ) ;
43
46
fs . mkdirSync ( dirname ) ;
44
47
}
45
48
46
49
fs . writeFileSync ( dest , JSON . stringify ( result , null , '\t' ) ) ;
50
+ console . log ( '[Finished] File written to: ' + dest ) ;
47
51
} ;
48
52
49
53
if ( path . basename ( process . argv [ 1 ] ) === 'build-grammar.js' ) {
54
+ console . log ( '[Starting] Converting ' + process . argv [ 2 ] + ' to json.' ) ;
50
55
exports . update ( process . argv [ 2 ] , process . argv [ 3 ] ) ;
51
56
}
You can’t perform that action at this time.
0 commit comments