Skip to content

Commit

Permalink
chore: Carbon now cli for screenshot outputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pattobrien committed Feb 14, 2024
1 parent e869ae1 commit 9855575
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 0 additions & 2 deletions docs/before_and_after/after/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'package:cli_annotations/cli_annotations.dart';

part 'runner.g.dart';

Future<void> main(List<String> arguments) => GitRunner().run(arguments);

/// A command-line interface for version control.
@cliRunner
class GitRunner extends _$GitRunner {
Expand Down
2 changes: 0 additions & 2 deletions docs/before_and_after/before/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'dart:io';

import 'package:args/command_runner.dart';

Future<void> main(List<String> arguments) => GitRunner().run(arguments);

/// A dart implementation of distributed version control.
class GitRunner extends CommandRunner<void> {
GitRunner()
Expand Down
Binary file added docs/before_and_after/screenshots/after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/before_and_after/screenshots/before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/before_and_after/script.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# #!/usr/bin/env zsh

typeset -A files
files[before/runner.dart]=before
files[after/runner.dart]=after

for file in ${(k)files}
do
output=${files[$file]}
echo "Processing: $file"
# note: best themes to use are: seti, synthwave '84, night owl, vscode
carbon-now $file -p my-preset --save-as screenshots/$output && echo "Output: $output"
done
10 changes: 6 additions & 4 deletions example/bin/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:example/runner.dart';

void main(List<String> arguments) async {
final runner = GitRunner();
await runner.run(arguments);
}
// void main(List<String> arguments) async {
// final runner = GitRunner();
// await runner.run(arguments);
// }

Future<void> main(List<String> arguments) => GitRunner().run(arguments);

0 comments on commit 9855575

Please sign in to comment.