Angular: AngularDart should ship a CLI for common actions

Created on 15 May 2017  路  4Comments  路  Source: angulardart/angular

Each full AngularDart component needs a folder with three files (.dart, .css, .html) in the recommended setup (yes, you can inline style and template to the Dart file, but that's almost never done in real projects).

AngularTS has angular_cli which helps people build new components. Polymer has Polymer CLI with a similar feature set.

In Dart, we could do things like:

$ pub run angular create component MyCustomComponent

or

$ pub run angular:new_element MyCustomComponent

The support for CLI is already baked into pub. And it also means that you can just run pub run global activate angular once and then the above examples get much shorter (angular create component).

鈿ew feature dev cycle new user discussion

Most helpful comment

I know it's sad, but codegen can make a huge difference with respect to adoption rates. Just look at pivotal/spring. There are far better ways of doing things, yet they dominate due to codegen sugar. Having a cli for common actions, would go a long ways towards attracting early adopters. We have a term/concept for "technical debt". Let's call this "marketing debt".

All 4 comments

One issue is we'd prefer not to add CLI-only dependencies to angular (in-fact, going the opposite direction by moving into several sub packages, i.e. angular_compiler to encapsulate the AOT-compiler).

Pub needs to be able to support targets/sub-packages for this to work cleanly; otherwise we might just want to create an angular_cli project/package.

I know it's sad, but codegen can make a huge difference with respect to adoption rates. Just look at pivotal/spring. There are far better ways of doing things, yet they dominate due to codegen sugar. Having a cli for common actions, would go a long ways towards attracting early adopters. We have a term/concept for "technical debt". Let's call this "marketing debt".

Superseded by https://github.com/dart-lang/webdev/issues/1 after discussion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zoechi picture zoechi  路  5Comments

iu4u57k3 picture iu4u57k3  路  6Comments

ranquild picture ranquild  路  6Comments

matanlurey picture matanlurey  路  4Comments

chalin picture chalin  路  3Comments