ngdart 1.0.0 ngdart: ^1.0.0 copied to clipboard
A command-line tool for creating and managing AngularDart projects.
ngdart #
A command-line tool for creating and managing AngularDart projects.
Usage #
ngdart
is not meant to be used as a dependency but a command-line tool. Hence, you have to "activate" it:
dart pub global activate ngdart
Dart will detect automatically if you have added the Pub executables path to your environment variables. Follow its instructions if you haven't.
If you use the Dart SDK provided by the Flutter SDK, it is highly recommended to also add the Dart SDK's bin to your environment variables (otherwise sometimes the program can't find pub
, which is not directly provided in the Flutter SDK). It is located at path/to/flutter/sdk/bin/cache/dart-sdk/bin
To create a new AngularDart project:
ngdart create <package_name>
To remove the build/
and .dart_tool/
directory (similar to flutter clean
), run in your project directory:
ngdart clean
Motivation #
Stagehand, the tool that many AngularDart developers use to generate a starter, has been discontinued in favor of dart create
. However, since dart create
doesn't have an option for AngularDart projects, developers are left with nothing but quickstart and angular_cli, which are both great options but very outdated. Hence, ngdart
is created to compensate for the lack of tools.
Also, as a Flutter developer myself, I'm often envious of how many useful tools that the Flutter cli tool provides (such as flutter clean
). Hence, another purpose of ngdart
is to unify the all the tools developers need to create a brilliant AngularDart project. The first step is ngdart clean
, and more is coming (see Future Plans) below)
Future Plans #
Feel free to create pull requests on any of these goals! :) To prevent doing duplicate work, I marked the ones that I myself is currently working on.
- ❌ Add
--verbose
global flag [currently working on] - ❌ Add
ngdart build
andngdart serve
command (likely from webdev, but null safety has been a problem for me) - ❌ Generate components (a function that angular_cli provides, though I'm unsure if this is useful for many developers)