Commit Graph

23 Commits

Author SHA1 Message Date
Yegor Jbanov 99045b2f6a refactor: update Dart package dependencies 2015-03-25 15:54:12 -07:00
Tim Blasi b35f288794 refactor(dart/transform): Use package:guinness in tests
`guinness` is a Dart port of Jasmine. Since the rest of Angular 2 uses
Jasmine, use it for the transformer too.

Closes #8

Closes #1037

Closes #1000
2015-03-21 15:18:15 -07:00
Tim Blasi 4e82cc0861 refactor(dart/transform): Test `directive_linker` as a unit
Formerly, it was tested only as a piece of the transformer pipeline. Add
its own directory and test the linker on its own.
2015-03-21 15:18:15 -07:00
Tim Blasi c735644c57 refactor(dart/transform): Minor logging changes
Enable easier testing by providing a null log implementation and a way
to use it.
2015-03-21 15:18:15 -07:00
Tim Blasi 5d479fa0ae refactor(dart/transform): Remove `ngData`
Now that we have `Parser`, `ngData` is redundant & unnecessary.
2015-03-21 15:18:15 -07:00
Tim Blasi 8baedca972 style(dart/transform): Remove `src` from library directives
Conform to Angular 2 style by removing `src` from library directives.
Completed with:
```
find -name "*.dart" | xargs sed -i -e 's!library\(.*\)src\.\(.*\)!library \1\2!'
```

Closes #1005

Closes #1038
2015-03-21 14:55:11 -07:00
Tim Blasi 08b56e1c53 feat(dart/transform): Add simple ParseTemplates step
Generate methods in the ParseTemplates step.
Add a test for inline template method generation.
2015-03-19 08:05:44 -07:00
Tim Blasi b3fa1fa4fa feat(dart/transform): Add simple ParseTemplates step
Adds a step that parses `inline` Template values to generate getters and
setters.
2015-03-19 07:06:51 -07:00
Tim Blasi d10df7de44 style(dart/transform): Rename .ngDeps.dart => .ng_deps.dart
Update to conform with file naming conventions.

Closes #975
2015-03-17 22:12:08 -07:00
Tim Blasi 5c1c534894 test(dart/transform): Move BindGenerator tests to their own dir.
Move existing BindGenerator test to its own directory and to test that
phase specificially, rather than the whole pipeline.
Add another BindGenerator test.
2015-03-13 10:25:11 -07:00
Tim Blasi 4b12c19560 feat(dart/transform): Add a parser for `.ng_deps.dart` files and use.
Use the parser in `BindGenerator`
This checkin also removes types from `registerSetters` calls since they
can cause runtime failures (see #886). We will resolve this by
generating change detector classes in the future.
2015-03-13 10:24:15 -07:00
Tim Blasi 92b22d24d0 feat(dart/transform): Add a `.ng_deps.dart` file parser.
Create a common, reusable `.ng_deps.dart` file parser. All future transformer
phases build on the information in `.ng_deps.dart` files.
2015-03-13 10:24:15 -07:00
Tim Blasi 95c9eca64c style(dart/transform): Change quote character for consistency.
Use ' as a quote character in generated output instead of ".
2015-03-13 10:24:15 -07:00
Rado Kirov dd3e6271c2 chore(services): rename services.
Closes #711
2015-03-11 18:30:37 -07:00
Tim Blasi f4e0f51f5a feat(dart/transform) Register parameter metadata information
Adds any metadata attached to a parameter to the "parameters" value
passed in to `registerType`.

For example:
`MyComponent(@Inject(Foo) foo)` generates
`"parameters": const [const [const Inject(Foo)]]`

Also reorganizes the testing code.

Closes #7
2015-03-11 17:21:49 -07:00
Tim Blasi d0aceef4e0 perf(dart/transform) Restructure transform to independent phases
Update summary:
- Removes the need for resolution, gaining transform speed at the cost
  of some precision and ability to detect errors
- Generates type registrations in the package alongside their declarations
- Ensures that line numbers do not change in transformed user code
2015-03-10 19:19:02 -07:00
Tim Blasi 50a74b1d91 feat(dart/transform): Generate setter stubs.
Generate calls to Reflector#registerSetters from the information in
provided `Directive#bind` values.

This is only an initial attempt - it covers only the most basic values
of `bind`.

Closes #780
2015-02-25 09:54:13 -08:00
Tim Blasi 3b6aaf9054 feat(dart/transform) Remove import of dart:mirrors
+ Precede the call to `new ReflectionCapabilities()` with our generated
code which populates the reflection map statically.
+ Add the import of our generated code.
+ Once we are generating all necessary code, we will remove the
import of reflection_capabilities.dart and the instantiation of
`ReflectionCapabilities`, cutting the dependency on dart:mirrors.

Closes #761
2015-02-23 18:36:29 -08:00
Yegor Jbanov d1f03e509b fix(benchpress): benchpress fixes and a smoke test for Dart 2015-02-23 10:50:51 -08:00
Tim Blasi fb49946160 feat(dart/transform) Allow ctor stubs to be tree shaken
Change the method used to discover Directive annotated classes to ensure
that the Dart code can be tree shaken.

Closes #497

Closes $\x23736
2015-02-21 18:20:05 +00:00
Tim Blasi 329b2eda66 refactor(dart/transform tests): Use actual directive def'n instead of mock.
In the transformer unit tests, we previously used a mock directive annotation. This update
substitutes the actual Angular2 directive annotations.

Closes #706
2015-02-20 09:44:56 -08:00
Tim Blasi 4d56a1e1af chore: Fixing review comments on Dart transformers
See https://codereview.chromium.org/927373004/

Closes #705
2015-02-18 21:08:42 -08:00
Tim Blasi 6e90cacaf4 feat(dart/transformer:: Initial commit of ctor stubs & annotation register
Closes #646

Closes #496

Closes #498
2015-02-17 16:34:19 -08:00