Skip to content

Commit

Permalink
Add comment header to auto-generated output.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjrv committed Aug 9, 2015
1 parent c374fb9 commit c91c97d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion autogypi.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,10 @@ if(!conf['output']) {

result.outputPath = path.resolve(path.dirname(confPath), conf['output']);

var header = [
'# Automatically generated file. Edits will be lost.',
'# Based on: ' + path.relative(path.dirname(result.outputPath), confPath)
].join('\n');

// Serialize generated .gypi contents as JSON to output file.
fs.writeFileSync(result.outputPath, JSON.stringify(result.gypi) + '\n');
fs.writeFileSync(result.outputPath, header + '\n' + JSON.stringify(result.gypi) + '\n');

0 comments on commit c91c97d

Please sign in to comment.