From c2b808a28c8aa248d2b43eea15d0735fd91b6666 Mon Sep 17 00:00:00 2001 From: birjuvachhani Date: Sun, 16 Feb 2020 17:20:41 +0530 Subject: [PATCH] :pencil: prepare for 0.3.3 :pencil: update readme :pencil: update changelog :pencil: update help manuals :arrow_up: increase version Signed-off-by: birjuvachhani --- CHANGELOG.md | 5 +++++ README.md | 34 ++++++++++++++++++++++++++++------ lib/src/help_manuals.dart | 14 +++++++++----- lib/src/version.dart | 2 +- pubspec.yaml | 2 +- 5 files changed, 44 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eabe77..64e8684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.3 + +- Added smart watch feature. +- use `--smart-watch` option when running build command to enable it. + ## 0.3.2 - Fix create command diff --git a/README.md b/README.md index ec8b29a..783a6fa 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,20 @@ see help for more information: spider build --help ``` +### Smart Watch (Experimental) + +The normal `--watch` option watches for any kind of changes that happens +in the directory. However this can be improved my smartly watching the +directory. It includes ignoring events that doesn't affect anything like +file content changes. Also, it only watches allowed file types and +rebuilds upon changes for those files only. + +Run following command to watch directories smartly. + +```shell +spider build --smart-watch +``` + ### Categorizing by File Extension By default, Spider allows any file to be referenced in the dart code. @@ -140,12 +154,6 @@ class Assets { } ``` -### Customize Configuration -To use custom configurations, Spider searches for a yaml file named -'spider.yaml' or 'spider.yml' in the -root directory of the flutter project. see default configs block for -information on available configurations. - ## Advanced Configuration Spider provides supports for multiple configurations and classifications. If you wanna group your assets by module, type or anything, you can do @@ -177,6 +185,20 @@ So when you refer to `Images` class, auto-complete suggests raster images only and you know that you can use them with `AssetImage` and other one with vector rendering library. +## Enable Verbose Logging + +Spider prefers not to overwhelm terminal with verbose logs that are +redundant for most of the cases. However those verbose logs come quite +handy when it comes to debug anything. You can enable verbose logging by +using `--verbose` option on build command. + +```shell +spider build --verbose + +# watching directories with verbose logs +spider build --watch --verbose +``` + ## License ``` Copyright © 2020 Birju Vachhani diff --git a/lib/src/help_manuals.dart b/lib/src/help_manuals.dart index a318bb1..3f4ffd3 100644 --- a/lib/src/help_manuals.dart +++ b/lib/src/help_manuals.dart @@ -26,7 +26,7 @@ spider create [arguments] ARGUMENTS: -j, --json Generates config file of type JSON rather than YAML. - -h, --help, -? Show help + -h, --help, Show help '''; static const SPIDER_HELP = ''' @@ -54,9 +54,13 @@ spider build [arguments] used by this command to generate dart code. ARGUMENTS: - -w, --watch Watches assets directory for file changes and re-generates - dart code upon file creation, deletion or modification. - -v, --verbose Shows verbose logs - -h, --help, -? Show help + -w, --watch Watches assets directory for file changes and re-generates + dart references upon file creation, deletion + or modification. + --smart-watch Smartly watches assets directory for file changes and + re-generates dart references by ignoring events and files + that doesn't fall under the group configuration. + -v, --verbose Shows verbose logs + -h, --help Show help '''; } diff --git a/lib/src/version.dart b/lib/src/version.dart index 246b602..33ca3b7 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '0.3.2'; +const packageVersion = '0.3.3'; diff --git a/pubspec.yaml b/pubspec.yaml index 022f9f2..58a7175 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: spider description: A small dart command-line tool for generating dart references of assets from the assets folder. -version: 0.3.2 +version: 0.3.3 homepage: https://github.com/BirjuVachhani/spider environment: