Skip to content

Commit

Permalink
Merge pull request #2 from willemneal/asconfig
Browse files Browse the repository at this point in the history
Add showConfig to print out config and exit
  • Loading branch information
jtenner authored Jul 15, 2020
2 parents b177e94 + e80cd8b commit d3a347d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ exports.main = function main(argv, options, callback) {
}
}

// If showConfig print args and exit
if (args.showConfig) {
// FIXME: not a proper C-like API
stderr.write(JSON.stringify(args, null, 2));
return callback(null);
}

// This method resolves a path relative to the baseDir instead of process.cwd()
function resolve(arg) {
if (path.isAbsolute(arg)) return arg;
Expand Down
5 changes: 5 additions & 0 deletions cli/asc.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@
"type": "b",
"default": false
},
"showConfig": {
"description": "Print out compiler configuration and not emit code.",
"type": "b",
"default": false
},
"measure": {
"description": "Prints measuring information on I/O and compile times.",
"type": "b",
Expand Down

0 comments on commit d3a347d

Please sign in to comment.