docs: update docs

This commit is contained in:
Chen Asraf
2022-12-07 18:19:38 +02:00
parent bb0c593ef8
commit 47347a83aa
3 changed files with 80 additions and 31 deletions

101
README.md
View File

@@ -1,39 +1,86 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
# btool
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
A build helper for Dart/Flutter projects.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
## Features
TODO: List what your package can do. Maybe include images, gifs, or videos.
Contains utility for getting/setting various configs such as package version/name, min/target sdk
version, etc. through a command-line or Dart import which you can utilize for your build steps.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
### Install globally
```shell
dart pub global activate btools
# or
flutter pub global activate btools
```
And then to use:
```shell
btools -h
```
### Install locally
```shell
dart pub add [--dev] btools
# or
flutter pub add [--dev] btools
```
And then to use:
```shell
dart run btools -h
```
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
```txt
Usage: btool <command> [...args]
```dart
const like = 'sample';
Commands:
get <key> Get config value
set <key> <value> Set config value
Available keys:
- minSdkVersion
- targetSdkVersion
- packageVersion
- packageName
- applicationId
Optional flags:
-h, --help Show help
-v, --version Show version
-d, --working-dir Change working directory of script
-V, --verbose Display debug output
```
## Additional information
## Contributing
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
I am developing this package on my free time, so any support, whether code, issues, or just stars is
very helpful to sustaining its life. If you are feeling incredibly generous and would like to donate
just a small amount to help sustain this project, I would be very very thankful!
<a href='https://ko-fi.com/casraf' target='_blank'>
<img height='36' style='border:0px;height:36px;'
src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3'
alt='Buy Me a Coffee at ko-fi.com' />
</a>
I welcome any issues or pull requests on GitHub. If you find a bug, or would like a new feature,
don't hesitate to open an appropriate issue and I will do my best to reply promptly.
If you are a developer and want to contribute code, here are some starting tips:
1. Fork this repository
2. Run `dart pub get`
3. Make any changes you would like
4. Create tests for your changes
5. Update the relevant documentation (readme, code comments)
6. Create a PR on upstream

View File

@@ -101,7 +101,7 @@ class BToolOptions {
}
static String get usage {
const pad = 23;
const pad = 21;
return [
'Usage: btool <command> [...args]',
'',
@@ -111,6 +111,7 @@ class BToolOptions {
'${'set <key> <value>'.padRight(pad)}Set config value',
'',
'Available keys:',
'',
BToolOptionKey.values.map((x) => '- ${x.name}').join('\n'),
'',
'Optional flags:',

View File

@@ -1,10 +1,10 @@
name: btool
description: Generic build helper tools for flutter
version: 0.0.1
homepage: 'https://github.com/chenastag/btool'
version: 0.1.0
homepage: 'https://github.com/chenasraf/btool'
executables:
btool: main.bin
btool: btool
environment:
sdk: '>=2.19.0-255.2.beta <3.0.0'
@@ -26,3 +26,4 @@ script_runner:
- activate-local: 'dart pub global activate --source path ./'
- activate-global: 'dart pub global activate btool'
- auto-fix: dart fix --apply
- publis: dart pub publish -f