shellcommand 0.1.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 44

shellcommand

Helper for executing commands on the commandline

Usage

class Git extends ShellCommand {
    Git() : super("git");
}

void main(List<String> arguments) async {
    final git = Git();
    
    if(!(await git.exists)) {
        print("git is not installed - please install it via 'apt install git'!");
        return;
    }

    final result = await git.run([ "--help" ]);
    if(result.exitCode != 0) {
        print("ExitCode: ${exitCode}!");
        print(result.stderr);
    } else {
        print(result.stdout);
    }
}

Another example can be found on GitHub

If you have problems

License

Copyright 2018 Michael Mitterer (office@mikemitterer.at), 
IT-Consulting and Development Limited, Austrian Branch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, 
software distributed under the License is distributed on an 
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
either express or implied. See the License for the specific language 
governing permissions and limitations under the License.


Change Log for shellcommand

Helper for calling system binaries

Unreleased

Docs

This CHANGELOG.md was generated with Changelog for Dart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  shellcommand: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:shellcommand/shellcommand.dart';
  
Version Uploaded Documentation Archive
0.1.1 Sep 13, 2018 Go to the documentation of shellcommand 0.1.1 Download shellcommand 0.1.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6

Platforms

Detected platforms: Flutter, other

Primary library: package:shellcommand/shellcommand.dart with components: io.

Health suggestions

Format bin/runCommands.dart.

Run dartfmt to format bin/runCommands.dart.

Format lib/shellcommand.dart.

Run dartfmt to format lib/shellcommand.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use shellcommand.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
logging >=0.11.3 <1.0.0 0.11.3+2
validate ^1.0.0 1.7.0
where ^4.3.0 4.4.0 5.0.0
Transitive dependencies
args 1.5.1
build_cli_annotations 1.0.0
meta 1.1.6
path 1.6.2
Dev dependencies
build_runner any
build_test any
console_log_handler >=1.1.0 <2.0.0
test any