daily_programmer_client_dart 1.1.2 copy "daily_programmer_client_dart: ^1.1.2" to clipboard
daily_programmer_client_dart: ^1.1.2 copied to clipboard

Dart 1 only

Daily programing dart. `daily_programmer_dart_cli` will generate a project skeleton into the current directory.

example/main.dart

import 'dart:io';

const _nameOfProject = 'project-example';

// This dart code send 4 command in your shell for example.
void main(List<String> args) {
  setUpExample();
  // Step 1: project command dry run
  run('daily_programmer_dart_cli project --dry-run -p /tmp -n challenge-0 $_nameOfProject');
  // Step 2: project command
  run('daily_programmer_dart_cli project -p /tmp -n challenge-0 project');
  // Step 3: challenge command dry run
  run('daily_programmer_dart_cli challenge --dry-run -p /tmp/$_nameOfProject challenge-1');
  // Step 4: challenge command
  run('daily_programmer_dart_cli challenge -p /tmp/$_nameOfProject challenge-1');
}

/// Simple process runner wrapper
void run(String command) {
  Process.runSync(command.split(' ')[0], command.split(' ')..removeAt(0));
}

/// Check OS and remove `/tmp/project` for clean this example
void setUpExample() {
  if (!Platform.isLinux && !Platform.isMacOS) {
    print('Your OS (${Platform.operatingSystem}) is not supported.');
    exit(1);
  }
  run('rm -rf /tmp/$_nameOfProject');
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Daily programing dart. `daily_programmer_dart_cli` will generate a project skeleton into the current directory.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, logging, mustache, path, resource

More

Packages that depend on daily_programmer_client_dart