[ffigen] Simplified run command (#15)
`pub run ffigen:generate` is now replaced by `pub run ffigen`
diff --git a/pkgs/ffigen/README.md b/pkgs/ffigen/README.md
index d85769b..5ac1763 100644
--- a/pkgs/ffigen/README.md
+++ b/pkgs/ffigen/README.md
@@ -40,7 +40,7 @@
- Build it (see [building](#building)).
- Add this package as dev_dependency in your `pubspec.yaml`.
- Configurations must be provided in the pubspec.yaml file under the key `ffigen` (or directly under a seperate yaml file which when u specify it passing `--config filename` when running the tool)
-- Run the tool- `pub run ffigen:generate`.
+- Run the tool- `pub run ffigen`.
## Building
A dynamic library for a wrapper to libclang needs to be generated as it is used by the parser submodule.
@@ -60,7 +60,7 @@
## Trying out examples
1. `cd examples/<example_u_want_to_run>`, Run `pub get`.
-2. Run `pub run ffigen:generate`.
+2. Run `pub run ffigen`.
## Running Tests
Dynamic library for some tests need to be built before running the examples.
diff --git a/pkgs/ffigen/bin/generate.dart b/pkgs/ffigen/bin/ffigen.dart
similarity index 98%
rename from pkgs/ffigen/bin/generate.dart
rename to pkgs/ffigen/bin/ffigen.dart
index 7f29f2a..26f2605 100644
--- a/pkgs/ffigen/bin/generate.dart
+++ b/pkgs/ffigen/bin/ffigen.dart
@@ -11,7 +11,7 @@
import 'package:logging/logging.dart';
import 'package:yaml/yaml.dart' as yaml;
-var _logger = Logger('generate.dart');
+var _logger = Logger('ffigen.dart');
void main(List<String> args) {
// Parses the cmd args.
diff --git a/pkgs/ffigen/example/c_json/README.md b/pkgs/ffigen/example/c_json/README.md
index 9ba9d43..d689ce5 100644
--- a/pkgs/ffigen/example/c_json/README.md
+++ b/pkgs/ffigen/example/c_json/README.md
@@ -15,7 +15,7 @@
## Generating bindings
At the root of this example (`example/c_json`), run -
```
-pub run ffigen:generate
+pub run ffigen
```
This will generate bindings in a file: [cjson_generated_bindings.dart](./cjson_generated_bindings.dart)
diff --git a/pkgs/ffigen/example/libclang-example/readme.md b/pkgs/ffigen/example/libclang-example/readme.md
index 4918a37..33a01ef 100644
--- a/pkgs/ffigen/example/libclang-example/readme.md
+++ b/pkgs/ffigen/example/libclang-example/readme.md
@@ -6,6 +6,6 @@
## Generating bindings
At the root of this example (`example/libclang-example`), run -
```
-pub run ffigen:generate
+pub run ffigen
```
This will generate bindings in a file: [generated_bindings.dart](./generated_bindings.dart).
diff --git a/pkgs/ffigen/example/simple/README.md b/pkgs/ffigen/example/simple/README.md
index 6fc5243..d286dab 100644
--- a/pkgs/ffigen/example/simple/README.md
+++ b/pkgs/ffigen/example/simple/README.md
@@ -5,6 +5,6 @@
## Generating bindings
At the root of this example (`example/simple`), run -
```
-pub run ffigen:generate
+pub run ffigen
```
This will generate bindings in a file: [generated_bindings.dart](./generated_bindings.dart).
diff --git a/pkgs/ffigen/lib/src/README.md b/pkgs/ffigen/lib/src/README.md
index 2832400..d999223 100644
--- a/pkgs/ffigen/lib/src/README.md
+++ b/pkgs/ffigen/lib/src/README.md
@@ -1,6 +1,6 @@
## Project Structure
-- `bin` - Contains generate.dart script which end user will execute.
+- `bin` - Contains ffigen.dart script which end user will execute.
- `tool` - Contains script to generate LibClang bindings using Code_Generator submodule (dev use only).
- `example` - Example projects which demonstrate generation of bindings for given C header files.
- `lib/src/code_generator` - Generates binding files.
@@ -38,4 +38,4 @@
- type_extractor (extracts types from variables, function parameters, return types).
- includer (tells what should/shouldn't be included depending of config).
- parser (Main Entrypoint) (creates translation units for all header files, and sets up parsing them).
-- translation_unit_parser (parses header files, splits declarations and feeds them to their respective sub_parsers).
\ No newline at end of file
+- translation_unit_parser (parses header files, splits declarations and feeds them to their respective sub_parsers).
diff --git a/pkgs/ffigen/test/native_functions_test/config.yaml b/pkgs/ffigen/test/native_functions_test/config.yaml
index 4af2def..3635c70 100644
--- a/pkgs/ffigen/test/native_functions_test/config.yaml
+++ b/pkgs/ffigen/test/native_functions_test/config.yaml
@@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.
# =================== GENERATING TEST BINDINGS ==================
-# dart ../../bin/generate.dart --config config.yaml
+# dart ../../bin/ffigen.dart --config config.yaml
# ===============================================================
output: 'native_functions_bindings.dart'
diff --git a/pkgs/ffigen/tool/libclang_config.yaml b/pkgs/ffigen/tool/libclang_config.yaml
index 575a440..0e61256 100644
--- a/pkgs/ffigen/tool/libclang_config.yaml
+++ b/pkgs/ffigen/tool/libclang_config.yaml
@@ -6,7 +6,7 @@
# ===================== GENERATING BINDINGS =====================
# cd to `tool`, and run -
-# dart ../bin/generate.dart --config libclang_config.yaml
+# dart ../bin/ffigen.dart --config libclang_config.yaml
# ===============================================================
output: '../lib/src/header_parser/clang_bindings/clang_bindings.dart'