Commit Graph

45 Commits

Author SHA1 Message Date
vsavkin 8326ab3240 feat(i18n): add a simple dart script extracting all i18n messages from a package
Closes #7620
2016-03-17 16:45:16 -07:00
vsavkin e1f8e54e34 feat(i18n): implement xmb serializer 2016-03-17 16:45:15 -07:00
Tim Blasi 15e16148f4 feat(dart/transform): Create standalone transformers for phases
Create transformers that allow specifying transformer actions on
specific libraries.

* angular2/transform/codegen: Generates all necessary code.
* angular2/transform/reflection_rewriter: Replaces `bootstrap` calls in
  application entry points to remove transitive dart:mirrors import,
  resulting in smaller code size & faster execution.
* angular2/transform/deferred_rewriter: Rewrites deferred imports and
  `loadLibrary` calls to initialize Angular2 and preserve deferred
  operation.

Proper configuration of these three transformers can replace the single
angular2 transformer, resulting in significant performance gains for
builds of large angular2 apps.

Update angular2 itself to declare the codegen transformer, since it has
neither deferred imports nor application entry points.

Remove the undocumented & unused quick_transformer.
2016-03-04 09:52:44 +00:00
Julie Ralph 5a59e44765 chore(test): migrate Dart tests to package:test
Instead of running with karma and the karma-dart shim, run dart
tests directly using the new package:test runner. This migrates
away from package:unittest.

Fixes a couple tests, mostly associated with depending on absolute
URLs or editing the test providers after an injector had already
been created.

Remove karma-dart and associated files. Change gupfiles to run tests
via `pub run test` instead.
2016-03-04 02:27:44 +00:00
Kevin Moore 579b890446 chore(dart) Update dev dependency on code_tranformers
Closes https://github.com/angular/angular/issues/6665
2016-03-03 23:12:02 +00:00
Tim Blasi 1fd924f7d5 refactor(dart/transform): Simplify deferred rewriting
Simplify the DeferredRewriting and move package:quiver to a dev
dependency.

Closes #6994
2016-02-10 23:43:57 +00:00
Tim Blasi 4d0c2ed1f6 test(dart/transform): Update dependencies & fix Dart tests
Widen version dependencies for `package:angular`, `package:code_transformers`,
and `package:observe`.

`package:guinness` uses `package:unittest` while
the newest versions of `package:code_transformers` use `package:test`.
This causes our end-to-end Dart transformer tests (which use testing
code in `package:code_transformers`) to be skipped.

To fix this:
- Move e2e tests to run in a separate file
- Run `gulp test.server.dart` tests serially

Closes #5922

Closes #5935
2016-01-14 00:29:03 +00:00
Tim Blasi c1c54ed0f2 refactor(dart/transform): Avoid using package:code_transformers
Replace uses of `package:code_transformers`, which is only used to
convert from uri to `AssetId`, with calls to the utility methods in
`src/transform/common/url_resolver.dart`.

Closes #5931
2016-01-13 22:24:42 +00:00
Julie Ralph 85d89babce fix(build): lock down version of package:code_transformers
A new verion is causing build issues, perhaps due to an undeclared
dependency on package:test. For now, lock down the version to the
last known working one.
2015-12-07 17:42:24 -08:00
Tobias Bosch e667ad3e6b refactor(compiler): make all commands const
Closes #5135
2015-11-09 10:59:08 -08:00
Tobias Bosch 993b3d62de refactor(compiler): don’t rely on external css parser
We used to use different external css parsers,
depending on the `DomAdapter`. This lead to
inconsistent behavior and environment specific errors.

Closes #5006
Closes #4993
2015-10-29 15:09:39 -07:00
Tim Blasi cf9d4662c9 refactor(dart/transform): Update protobuf dependencies
Update
- libprotoc to 2.6.1
- dart-protoc-plugin to 0.5.0
- pkg/protobuf 0.5.0

Closes #4681
2015-10-19 10:32:17 -07:00
Yegor Jbanov 841f8789fd refactor(transformer): precompile stylesheets
Part of #3605
2015-10-01 18:48:27 -07:00
Tim Blasi cb4ff7491a chore(dart/transform): Integrate protoc into gulp build
This change detects if the user has `protoc` available and, if so, uses
it to generate `.pb.dart` files. If not, pre-built files are used
instead.
2015-09-15 08:39:07 -07:00
Tim Blasi 46dd5fcbb0 refactor(transform): Remove reflection_entry_points parameter
Remove the now unnecessary `reflection_entry_points` parameter from the
Angular 2 transformer.

Support glob syntax for `entry_points`.
2015-08-31 13:02:29 -07:00
keertip a191c89193 refactor(dart/analyzer plugin): update to latest version of plugins
Closes #3681
2015-08-24 16:45:21 +00:00
Kevin Moore 6651aab11f refactor: allow the latest dart_style version 2015-08-10 19:05:09 +00:00
Kevin Moore 1386977a34 chore: cleanup to pubspec.yaml files
Depend on the released version of Dart 1.10
Sort dependencies per convention
2015-07-17 12:34:06 -07:00
Kevin Moore cdb6c9cda2 chore: support any version of pkg/observe >= 0.13.1
Closes https://github.com/angular/angular/issues/3117
2015-07-17 12:34:06 -07:00
vsavkin d449ea5ca4 feat(change_detection): added support for ObservableList from package:observe 2015-07-15 17:06:42 -07:00
Pouria Alimirzaei 3143d188ae feat(pipes): add number (decimal, percent, currency) pipes 2015-07-09 14:59:57 -07:00
Tim Blasi 851797aecb refactor(dart): Run dartfmt 0.1.8
Format Dart code using dartfmt 0.1.8. Update pubspec to require
dart_style 0.1.8.
2015-06-05 11:45:36 -07:00
Victor Berchet 53694eb64a feat(FakeAsync): check pending timers at the end of fakeAsync in Dart
Made possible with quiver 0.21.4
2015-06-04 09:09:18 +02:00
Kevin Moore 5fe88d63ef chore: support the latest release of Dart logging package 2015-05-26 13:51:54 -07:00
Victor Berchet 0f002a5b18 feat(fakeAsync): allow simulating the passage of time 2015-05-19 06:51:15 +02:00
Kevin Moore 649e276610 chore: support last dev build of Dart at 1.10.0-dev.1.10
Can revert once 1.11 is available
2015-05-06 18:21:46 -07:00
Kevin Moore 5ef11774c2 chore: update pubspec files
Allow latest analyzer version
Add an upper constraint to the Dart SDK
2015-05-06 17:55:03 -07:00
Jacob MacDonald 1864f60afb feat(benchmarks): Add basic dart transformer benchmarks.
Adds simple benchmarks for various transformation phases, as well as hello_world.
Does not integrate these into any benchmark frameworks yet.
2015-05-04 14:03:58 -07:00
Kevin Moore 7551a28f1a chore: show dart2js package warnings for angular2, benchmarks, examples
Closes #1468
2015-04-21 16:22:49 -07:00
Tim Blasi 77b31ab42f feat(dart/transform): Add debug transform parameters
Add two transform parameters to aid in debugging the transformer
- `mirror_mode`, with values {`debug`, `none`, and `verbose`}
- `init_reflector`, with values {`true`, `false`}

`mirror_mode`:
- `debug`: Allow reflective access, but log a message if it is used
- `none`: Remove reflective access, `throw` if it is used. Default value
- `verbose`: Allow reflective access, log a stack trace if it is used

`init_reflector`: Whether to generate calls to our generated
`initReflector` code.

These will be useful to reveal areas where the transformer is not generating
appropriate code and to quickly see where reflective accesses occur.

When the pub mode is `transform_dynamic`, we run in MirrorMode.debug
with `init_reflector = false`. This is used for testing purposes.
2015-04-20 12:32:04 -07:00
Jacob MacDonald c65fd31e86 feat(dart/transform): Detect annotations which extend Injectable or Template.
Create a method that recursively walks imports from an entry point and
determines where classes are registered.

Use this information to determine if a particular annotation implements or
extends Injectable or Template.
2015-04-16 07:17:24 -07:00
Tim Blasi 7cac7c5157 refactor(dart/transform): Correct Dart analyzer warnings
- Fix numerous Dart analyzer warnings we had been ignoring.
- Delete unused `in_progress` dir
2015-04-14 13:41:22 -07:00
Tim Blasi 82127571b5 feat(dart/transform): Use the Dart transformer for benchmarks
Remove explicit generation of reflection information in benchmark code
and generate it with the transformer.
2015-04-10 14:01:55 -07:00
Tim Blasi 09948f4403 feat(dart/transform): Add a `di` transformer
Add a transformer for `di` which generates `.ng_deps.dart` files for all
`.dart` files it is run on. These `.ng_deps.dart` files register
metadata for any `@Injectable` classes.

Fix unit tests for changes introduced by the di transformer.

When using `pub (build|serve) --mode=ngstatic`, we will also generate
getters and setters, parse templates, and remove import of `dart:mirrors`
in the Angular transform. Because this is still relatively immature, we
use the mode to keep it opt-in for now.

Closes #700
2015-04-02 11:06:33 -07:00
Yegor Jbanov 99045b2f6a refactor: update Dart package dependencies 2015-03-25 15:54:12 -07:00
vsavkin 75ecaf02b9 chore: upgrade guinness to remove a workaround in testlib 2015-03-13 18:19:10 -07:00
Yegor Jbanov 757eae8ad3 feat(compiler): DOM adapters + html5lib implementation; misc fixes 2015-02-27 16:49:14 -08:00
Yegor Jbanov cfe71def7e chore(packaging): 0.0.0-alpha.9; pubspec cleanup 2015-02-24 11:42:05 -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
Misko Hevery cf51057cdd fix: constrain stack_trace version, which breaks build 2015-02-17 15:07:18 -08:00
Tobias Bosch 729e38af19 feat(build): add npm publish script
Also fixes gulpfile:
- `runSequence` needs to be called with `done` callback
- `es5build` should only run when the task executes…
2015-02-10 16:28:28 -08:00
Yegor Jbanov dbdadbafe9 chore(pub): update authors 2015-02-06 11:46:49 -08:00
Yegor Jbanov d5b2c130ca chore(pub): add primary authors, description and homepage to pubspec 2015-02-06 11:40:16 -08:00
Yegor Jbanov 3f228669d7 chore(packaging): update import for the new file structure 2015-02-05 15:47:12 -08:00
Yegor Jbanov 3820609f24 chore(packaging): move files to match target file structure 2015-02-05 15:46:13 -08:00