Skip to content

Commit

Permalink
docs: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
lsaudon committed Feb 23, 2023
1 parent dbdc46f commit fa97ad9
Show file tree
Hide file tree
Showing 4 changed files with 1,743 additions and 34 deletions.
25 changes: 25 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom
.buildlog
.history
.svn
migrate_working_dir
*.iml
*.ipr
*.iws
.idea
.vscode
pubspec.lock
.dart_tool
.packages
build
coverage
dart_test.yaml
test
analysis_options.yaml
example/*
!example/README.md
63 changes: 30 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
## ast_explorer_cli
## Ast explorer cli

![coverage][coverage_badge]
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
[![Pub Version][pub_version_badge]][pub_package_link]
[![Pub Points][pub_points_badge]][pub_points_link]
[![License: MIT][license_badge]][license_link]

Generated by the [Very Good CLI][very_good_cli_link] 🤖

A Command-Line Interface for explorer dart ast..
A Command-Line Interface for explorer flutter/dart simplified ast.

---

Expand All @@ -18,54 +16,53 @@ If the CLI application is available on [pub](https://pub.dev), activate globally
dart pub global activate ast_explorer_cli
```

Or locally via:
## Usage

```sh
dart pub global activate --source=path <path to this package>
# Check unused translations
ast_explorer tree <folder-of-app>
```

## Usage
## Running locally

```sh
# Sample command
$ ast_explorer sample

# Sample command optioon
$ ast_explorer sample --cyan

# Show CLI version
$ ast_explorer --version

# Show usage help
$ ast_explorer --help
dart pub global activate --source=path . && ast_explorer tree example/main.dart
```

## Running Tests with coverage 🧪

To run all unit tests use the following command:

```sh
$ dart pub global activate coverage 1.2.0
$ dart test --coverage=coverage
$ dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info
dart pub global activate coverage
dart test --coverage=coverage
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info
```

To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov)
.
To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov).

```sh
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html
open coverage/index.html
```

## Build version

```sh
dart run build_runner build
```

---

[coverage_badge]: coverage_badge.svg
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
[license_link]: https://opensource.org/licenses/MIT
[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
[very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli
Generated by the [Very Good CLI][very_good_cli_link] 🤖

[license_badge]: https://img.shields.io/github/license/lsaudon/ast_explorer_cli
[license_link]: https://img.shields.io/github/license/lsaudon/ast_explorer_cli
[very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli
[pub_points_badge]: https://img.shields.io/pub/points/ast_explorer_cli
[pub_version_badge]: https://img.shields.io/pub/v/ast_explorer_cli
[pub_package_link]: https://pub.dev/packages/ast_explorer_cli
[pub_points_link]: https://pub.dev/packages/ast_explorer_cli/score
Loading

0 comments on commit fa97ad9

Please sign in to comment.