shellx_core 0.0.2+1 copy "shellx_core: ^0.0.2+1" to clipboard
shellx_core: ^0.0.2+1 copied to clipboard

A Core tool for Command-line Shell with listening stdin

shellx_core #

build: status pub package style: analysis License: MIT

A Core tool for Command-line Shell with listening stdin

Extend from kafka-shell

import 'dart:async';

import 'package:melos/melos.dart';
import 'package:shellx_core/shellx_core.dart';
import 'package:universal_io/io.dart';

Future<void> main(List<String> args) async {
  final config = await MelosWorkspaceConfig.fromDirectory(Directory.current);
  Shell()
    ..fromMelos(config.scripts.keys)
    ..run();
}

// Map.fromIterables(scripts, scripts.map((e) => MelosCommand(e)));

extension MeolsShell on Shell {
  void fromMelos(Iterable<String> scripts) => scripts.forEach(addMelos);
  void addMelos(String element) => addCommand(element, MelosCommand(element));
}

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

A Core tool for Command-line Shell with listening stdin

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

args, cli_script, cli_util, colorize, universal_io

More

Packages that depend on shellx_core