Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the verbose option in the node API #1332

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/src/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Future<RenderResult> _renderAsync(RenderOptions options) async {
useSpaces: options.indentType != 'tab',
indentWidth: _parseIndentWidth(options.indentWidth),
lineFeed: _parseLineFeed(options.linefeed),
verbose: isTruthy(options.verbose),
url: file == null ? 'stdin' : p.toUri(file).toString(),
sourceMap: _enableSourceMaps(options));
} else if (file != null) {
Expand All @@ -116,6 +117,7 @@ Future<RenderResult> _renderAsync(RenderOptions options) async {
useSpaces: options.indentType != 'tab',
indentWidth: _parseIndentWidth(options.indentWidth),
lineFeed: _parseLineFeed(options.linefeed),
verbose: isTruthy(options.verbose),
sourceMap: _enableSourceMaps(options));
} else {
throw ArgumentError("Either options.data or options.file must be set.");
Expand Down Expand Up @@ -146,6 +148,7 @@ RenderResult _renderSync(RenderOptions options) {
useSpaces: options.indentType != 'tab',
indentWidth: _parseIndentWidth(options.indentWidth),
lineFeed: _parseLineFeed(options.linefeed),
verbose: isTruthy(options.verbose),
url: file == null ? 'stdin' : p.toUri(file).toString(),
sourceMap: _enableSourceMaps(options));
} else if (file != null) {
Expand All @@ -157,6 +160,7 @@ RenderResult _renderSync(RenderOptions options) {
useSpaces: options.indentType != 'tab',
indentWidth: _parseIndentWidth(options.indentWidth),
lineFeed: _parseLineFeed(options.linefeed),
verbose: isTruthy(options.verbose),
sourceMap: _enableSourceMaps(options));
} else {
throw ArgumentError("Either options.data or options.file must be set.");
Expand Down
2 changes: 2 additions & 0 deletions lib/src/node/render_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class RenderOptions {
external String? get indentType;
external Object? get indentWidth;
external String? get linefeed;
external bool? get verbose;
external FiberClass? get fiber;
external Object? get sourceMap;
external bool? get sourceMapContents;
Expand All @@ -40,6 +41,7 @@ class RenderOptions {
String? indentType,
Object? indentWidth,
String? linefeed,
bool? verbose,
FiberClass? fiber,
Object? sourceMap,
bool? sourceMapContents,
Expand Down