Commit Graph

5246 Commits

Author SHA1 Message Date
Victor Berchet bcd6e4c468 feat(directive): add ng-non-bindable directive 2015-01-09 09:23:37 +01:00
Victor Berchet 48e50121d4 feat(compiler): handle compileChildren from @Decorator 2015-01-09 09:23:37 +01:00
Victor Berchet 9cacde92bb refactor(NgRepeat): remove dead code 2015-01-09 09:23:37 +01:00
Victor Berchet 4f2f083b16 feat(compiler): allow ignoring element children 2015-01-09 09:22:50 +01:00
Victor Berchet c141cbe865 refactor(pipeline_spec): remove dead code 2015-01-09 09:22:50 +01:00
vsavkin 2074cc1ca9 fix(bootstrap): change bootstrap not to create a separate injector for the provided bindings
Currently, we create a separate injector for the passed-in / root bindings. This injectors sits below the one creating the application component. This means that the applicaiton component cannot access the passed-in bindings.
2015-01-08 19:53:18 -08:00
vsavkin fbcc59dc67 feat(components): initial implementation of emulated content tag 2015-01-08 19:38:37 -08:00
Tobias Bosch 14e91e209e feat(test): add e2e tests for benchmarks and examples
Disables running the actual benchmarks on every commit as well
to speed up the build.
2015-01-08 10:51:08 -08:00
vsavkin 8c6527251b cleanup: remove `import from "test_lib"` from production code 2015-01-08 09:53:17 -08:00
vsavkin 6bb3b81465 cleanup: remove toBool
Since we decided to use the semantics of the host language, toBool is no longer needed.
2015-01-08 09:52:09 -08:00
Tobias Bosch 77aa3ed61b feat(benchpress): show more metrics and make the run mode configurable
Shows the metrics:
script, render, gcAmount, gcAmountInScript, gcTime

Run modes:
- detect: auto detect whether to force gc
- forceGc: forces a gc before every run and ignores no runs
- noGcInScript: ignore runs that have gc while a script was executing
- plain: does not force gc nor ignore runs

Closes #368
2015-01-07 16:37:52 -08:00
Tobias Bosch 82b1601a31 refactor(benchmarks): rename `timeBenchmark` into `benchmark` 2015-01-07 16:37:52 -08:00
Stephen Adams 1320175646 perf(change detection): minimized amount of code in protective try-catch 2015-01-07 13:12:43 -08:00
Rado Kirov a6a6273263 fix(compiler): fix nextSibling iterator in compiler.
Due to DOM manipulations happening during compilation, it is not correct
to call nextSibling after compilation steps.
2015-01-07 13:12:37 -08:00
Felipe Batista ef20b706aa Replaced Children loop iteration for the firstChild method 2015-01-07 09:48:07 -08:00
Victor Berchet 457cbaa39b fix(ProtoView): element injector should have either a parent or a host
fix #359
2015-01-07 11:55:58 +01:00
Victor Berchet 09092b269c fix(ElementBinderBuilder): allow a directive to have mutliple bindings
fix #320
2015-01-07 09:33:29 +01:00
Victor Berchet 7027674081 fix(compiler): fix a typo in BIND_NAME_REGEXP 2015-01-07 09:31:52 +01:00
gdi2290 164cf5b2a3 style(async): add missing type annotation js/dart 2015-01-06 18:10:10 -08:00
Tobias Bosch fe2a09bc7f refactor(perf): e2e tests and benchpress should be written in es6 2015-01-06 15:32:49 -08:00
Misko Hevery 373fd7d04a chore: add dart2js flags to benchmark to enable trust-type-annotations 2015-01-06 15:17:12 -08:00
Misko Hevery 0866485f95 perf: Traverse dom using firstChild instead of childNodes
5% improvement in speed by not using childNodes DOM API.
2015-01-06 13:16:57 -08:00
Tobias Bosch 6f303121c6 refactor(perf): introduce benchpress2
Major changes:
- make API more reusable
- format output nicely
- only force gc if needed

Regarding forcing gc:
Forcing gc can change script execution time.
We now don't force gc at first and ignore results where gc happens during script execution.
When we ignored too many results, we switch to forcing gc.

Closes #339
2015-01-05 17:49:50 -08:00
vsavkin 53906e484a fix(compiler): fix a dart analyzer warning 2014-12-30 13:25:18 -08:00
Tobias Bosch 3a80c4197d refactor(perf): move navigation into test files and rename `runSimpleBenchmark` 2014-12-29 16:58:31 -08:00
vsavkin e5dbc69f42 cleanup(di): change di.js to declare all exported symbols 2014-12-29 15:20:50 -08:00
vsavkin 739f624cc8 refactor(change_detection): add change_detection library file 2014-12-29 15:20:42 -08:00
vsavkin f06433fb58 feat(test_lib): implement SpyObject 2014-12-29 13:27:17 -08:00
vsavkin a37950293a cleanup(core): fix dart analyzer warnings 2014-12-29 12:12:11 -08:00
vsavkin da9d041f90 feat(view): add support for components that use shadow dom emulation 2014-12-29 11:42:34 -08:00
Tobias Bosch df4ac0dd33 refactor(perf): use webdriver to execute benchmarks
- use performance log of chromedriver / appium to get timeline data
  for calculating metrics for benchmarks
- change all benchmarks to be made of a standalone application
  and a protractor test that collectes timeline data
- fix and simplify benchmarks
- add dart2js to build
- remove benchpress

Closes #330
2014-12-23 22:22:55 -08:00
vsavkin d642c6afb5 feat(change_detector): wrap exceptions into ChangeDetectionError
ChangeDetectionError references the original error and the location where the error happened
2014-12-18 13:38:33 -08:00
vsavkin 3d534928b5 refactor(parser): align expression language with host language
Remove "enhancements" to the language from the parser, so the expression language mimics the host language.
2014-12-18 10:57:34 -08:00
Victor Berchet 90daca02cf fix(examples.dart): initialize the reflector
fixes #309
2014-12-18 11:11:18 +01:00
Victor Berchet 75549a660c fix(examples.dart): add LifeCycle to the reflector 2014-12-18 11:11:18 +01:00
Victor Berchet 86fb564818 fix(ChangeDispatcher): update the onRecordChange signature 2014-12-18 10:28:17 +01:00
vsavkin dbd85615b0 style(core): add missing type annotation 2014-12-17 15:58:20 -08:00
vsavkin 1d03c2af5d feat(change_detector): add a way to inspect records and record ranges 2014-12-17 15:43:36 -08:00
vsavkin df21c3c77d feat(zone): add support for long stack traces 2014-12-17 14:56:54 -08:00
vsavkin d5fcac4d7a feat(compiler): pass compilation unit to the parser 2014-12-12 18:52:53 -08:00
vsavkin cf8a5d2a0d cleanup(zones): cleanup 2014-12-12 15:24:30 -08:00
vsavkin 2184150905 feat(bootstrap): use VmTurnZone and LifeCycle to bootstrap an application 2014-12-12 15:24:30 -08:00
vsavkin 0b550f9695 feat(LifeCycle): change LifeCycle to be able register it with a zone 2014-12-12 15:24:30 -08:00
vsavkin df36ffb11d feat(zone): add initial implementation of VmTurnZone 2014-12-12 15:24:30 -08:00
Misko Hevery c25e9e7c5f fix: properly close the <tree> tag in benchmark 2014-12-11 14:23:02 -08:00
Misko Hevery 56b7ba4bce perf: improve baseline speed by 30%
Use node.firstChild and node.nextSibling instead 
of node.children or node.childNodes in the baseline
benchmark.
2014-12-11 14:05:58 -08:00
Rado Kirov 60456c8b89 feat(ng-repeat): initial implementaion of ng-repeat.
- adds support for content bindings via '[]'.
- directives module
2014-12-11 11:23:02 -08:00
Victor Berchet 59d6d604b4 fix(analyzer): fix a warning about an unused variable 2014-12-11 00:31:31 +01:00
Tobias Bosch 3ec3d5e084 perf(view): inline and refactor view instantiation and hydration
- Don’t convert DOM array into JS array via `Array.slice`
- Inline static methods for instantiation and hydration
- Misc cleanup

Closes #291
2014-12-09 16:16:45 -08:00
vsavkin 8acf9fb609 feat(change_detection): ensure that expression do not change after they have been checked 2014-12-08 18:51:19 -08:00
Tobias Bosch e7de5f8f37 feat(benchmarks): tree benchmark baseline 2014-12-08 15:54:04 -08:00
Victor Berchet 68da0012cc perf(Change Detection): remove the usage of getters/setters
- Firefox is 2.4x faster (90 vs 221ms)
- Chrome is 24% slower (15.5 vs 12.5ms)

Chrome is still 5.8x faster than Firefox
2014-12-08 21:59:59 +01:00
Victor Berchet 2c4a2f5158 perf(Change Detection): Track the range & group on changes only
1.4x speed improvement with Firefox

There is no need to track the range & group for all the records but only
for the records that have changed.
2014-12-08 21:59:59 +01:00
Victor Berchet ee36063fae style: misc minor changes 2014-12-08 21:59:59 +01:00
Victor Berchet c362f33fe4 style(Change Detection): rename WatchGroupDispatcher to ChangeDispatcher 2014-12-08 21:59:59 +01:00
Tobias Bosch 01fa90c11d feat(benchmarks): initial version of tree benchmark
Closes #269
2014-12-08 12:05:00 -08:00
Tobias Bosch 9b7e2e3029 fix(benchmarks_external): use angular dart transformer 2014-12-08 12:00:48 -08:00
Tobias Bosch 5793311421 fix(benchmarks): use explicit `main()` function and do not reexport
Otherwise `pub` would not pick it up e.g. for `dart2js`.
2014-12-08 12:00:48 -08:00
Tobias Bosch 72b970e4e2 fix(core): export ViewPort in the public exports 2014-12-08 12:00:47 -08:00
Tobias Bosch 9329c0e8bc fix(application): also bind the root component to the injector 2014-12-08 12:00:47 -08:00
Tobias Bosch 9c2d411450 feat(compiler): allow recursive components 2014-12-08 12:00:43 -08:00
vsavkin c3dc373ec4 refactor(change_detector): moves enableRecord/disableRecord into the Record class 2014-12-08 11:06:56 -08:00
vsavkin 7f941eb936 fix(change_detector): adding new ranges when disabling the current enabled record 2014-12-08 11:06:56 -08:00
vsavkin 984ff9bf1b cleanup(view): remove unused code 2014-12-05 19:06:11 -08:00
vsavkin 33b47bd5d4 fix(view): fix DirectivePropertyGroupMemento to return a new group instead of null 2014-12-05 19:01:16 -08:00
Tobias Bosch 8db77f2405 refactor(build): simplify and modularize
simplify:
- use same html file for dart and JS
- build benchmarks automatically when doing `gulp build`
- centralize configuration

modularize:
- move all build tasks into separate node.js modules under
  `tools/build`.

changes:
- the `build` folder is now the `dist` folder

Closes #284
2014-12-05 16:30:36 -08:00
Victor Berchet ceb9ee92bb fix(Change Detection): fix merge error 2014-12-05 12:20:00 +01:00
Rado Kirov 174613067c feat(views): adds (de)hydration of views and template vars.
Dehydrated views are views that are structurally fixed, but their
directive instances and viewports are purged.

Support for local bindings is added to the view.
2014-12-04 22:40:51 -08:00
Victor Berchet 5c531f718e perf(RecordRange): optimize disable()
There could be no lastEnabledChildRecord when there is no
firstEnabledChildRecord
- saves time by skipping findLastEnabledRecord() when the result is know
to be null,
- saves a test as isPresent(lastEnabledChildRecord) ==
isPresent(firstEnabledChildRecord)
2014-12-04 19:52:43 +01:00
Peter Bacon Darwin 983c00c495 docs(di/src/annotations): use triple backticks to code-fence code blocks 2014-12-04 14:16:52 +00:00
Victor Berchet 11c52ce06d style: fix typos 2014-12-04 11:01:19 +01:00
vsavkin 65242fbd6d perf(change_detection): add baseline to change detection benchmark 2014-12-03 18:09:21 -08:00
vsavkin 847cefcb7b feat(change_detector): notify directives on property changes 2014-12-03 14:33:52 -08:00
Rado Kirov 5bdefee6c9 fix(record-range): fixes bug when disabling empty ranges. 2014-12-03 12:04:06 -08:00
Rado Kirov c59cc8631a feat(examples): adds static dart hello world example.
Use gulp examples/pub.serve to start up the server and go to
http://localhost:8080/index_static.html to see the static app.
2014-12-03 10:58:30 -08:00
Victor Berchet 0f3134acd4 perf(ProtoRecordRange): re-use a ProtoRecordCreator 2014-12-03 12:10:07 +01:00
Victor Berchet f8c070c5e4 perf(ProtoRecord): remove the unused prev field 2014-12-03 12:10:07 +01:00
Tommy Odom f088e9ef15 feat(transpiler): Transform for..of to Dart as for..in
fixes #53
2014-12-03 10:48:48 +01:00
Victor Berchet bf71b94bde feat(Change Detector): Add support for collection content watch 2014-12-03 10:37:13 +01:00
Victor Berchet 2d2f44949d perf(Change Detection): Remove a useless test
Only "implicit receiver" records get their context updated (since #239)
2014-12-03 10:14:07 +01:00
Victor Berchet 7cb93fd59e feat(Change Detection): Add support for keyed access 2014-12-02 16:15:13 +01:00
Tobias Bosch 7bc282d15e feat(viewport): add initial integration test for template directives 2014-12-01 16:39:37 -08:00
Tobias Bosch 0758165fb5 fix(compiler): allow identifiers with `-` in the template bindings as keys. 2014-12-01 16:39:36 -08:00
Tobias Bosch 63053438ea fix(compiler): always wrap views into an own `<template>` element
This is needed to allow view instantiation also in browsers that
don’t support the `<template>` element and because of this would
return elements from the content of `<template>` elements when
using `element.querySelectorAll`.

Also stores the `elementBinder.nestedProtoView` correctly
when a template directive was used on a `<template>` element.
2014-12-01 16:39:36 -08:00
Pawel Kozlowski 95d86d151a fix(example): correct markup in the hello world example 2014-12-01 15:13:02 -08:00
Victor Berchet fc2181ec4e fix(Dart1.8): Promise handling 2014-12-01 21:17:16 +01:00
Victor Berchet 0703ee526c fix(Dart1.8): fix analyzer warnings 2014-12-01 21:17:16 +01:00
Uri Shaked 3e57189e45 fix(examples): fix hello_world example (js)
Added missing path mapping for the new reflection module.
2014-11-26 14:14:18 -08:00
vsavkin 1863d50978 feat(parser): adds support for variable bindings 2014-11-26 14:03:05 -08:00
vsavkin a3d9f0fead fix(parser): handle empty strings 2014-11-26 12:59:11 -08:00
vsavkin 6f889e3094 feat(di): add OpaqueToken to DI
Using `new Object()` as a token causes cryptic errors. OpaqueToken class should be used instead.
2014-11-26 12:52:16 -08:00
vsavkin 6187b80ce6 benchmark(compiler): add a benchmark measuring view instantiation in AngularDart 1.0 2014-11-25 17:46:11 -08:00
Rado Kirov c6f14dd833 feat(viewPort): adds initial implementation of ViewPort.
ViewPort is the mechanism backing @Template directives. Those
directives can use the viewport to dynamically create, attach and
detach views.
2014-11-25 16:19:50 -08:00
vsavkin 9a28fa8590 refactor(change_detection): make RecordRange responsible for removing iself 2014-11-25 14:33:19 -08:00
vsavkin 2b53a2f353 fix(ChangeDetector): fix issues with handling empty ranges 2014-11-25 14:28:02 -08:00
vsavkin 3d05f521fe fix(benchmarks): add the reflection module to benchmark config files 2014-11-24 18:17:22 -08:00
vsavkin 9466592ca6 refactor(benchmarks): rename paths.js into register_system.js to match other benchmarks 2014-11-24 18:16:50 -08:00
vsavkin bfd3c2d5a9 fix(reflection): update pubspec.yaml to add a missing dependency on reflection 2014-11-24 18:03:26 -08:00
vsavkin f55011cde2 fix(reflection): fix a typo 2014-11-24 18:02:21 -08:00
vsavkin 9a9a13a553 feat(change_detection): add benchmarks 2014-11-24 18:01:31 -08:00
vsavkin 6e8175a816 feat(Reflection): extract reflection capabilities into a separate module 2014-11-24 16:53:12 -08:00
Misko Hevery 044625a098 chore: Make field declarations explicit
This used to be valid code:

```
class Foo {
  constructor() {
    this.bar = ‘string’;
  }
}
```

This will now fail since ‘bar’ is not explicitly
defined as a field. We now have to write:

```
class Foo {
  bar:string; // << REQUIRED
  constructor() {
    this.bar = ‘string’;
  }
}
```
2014-11-24 16:35:39 -08:00
Victor Berchet ab961b327e feat(RecordRange): Set context for implicit receivers only 2014-11-24 15:32:25 +01:00
Victor Berchet 69af7ea2c0 feat(ChangeDetection): convert Record.mode to a bit field 2014-11-24 15:18:52 +01:00
Rado Kirov 70c38e6260 doc(example): adds comments to the hello world app.
Explains the basic concepts as seen in the demo app, but it is not a
substitute for proper documentation which will come later.
2014-11-20 12:32:30 -08:00
vsavkin 2980eb5b0b refactor(ChangeDetector): rename WatchGroup into RecordRange 2014-11-20 10:24:18 -08:00
vsavkin 862c6412c4 feat(ChangeDetector): implement enabling/disabling watch group 2014-11-20 10:24:18 -08:00
Tobias Bosch fc5b7edca4 feat(compiler): support `on-` and `[]` 2014-11-19 16:24:12 -08:00
Tobias Bosch c6846f1163 feat(compiler): new semantics for `template` attributes and view variables.
- Supports `<div template=“…”>`, including parsing the expressions within
  the attribute.
- Supports `<template let-ng-repeat=“rows”>`
- Adds attribute interpolation (was missing previously)
2014-11-19 14:32:15 -08:00
Rado Kirov d6193e9073 feat(examples): adds hello-world app.
The app is writen in ES6 and transpiles to ES5 and dart as part of the
usual build.

The app contains a component, a directive and a services wired together
through dependency injection.

Before Each:
- gulp build

For es5:
- gulp serve
- open 'localhost:8000/js/examples/lib/hello_world/'

For dart:
- gulp examples/pub.serve
- open 'localhost:8080'
2014-11-19 12:24:14 -08:00
Rado Kirov 1221857d17 feat(bootstraping): application bootstrapping implementation.
Entry-point to bootstrapping is a rootComponent. The bootstrapping
method, uses the component's selector to find the insertion element in
the DOM, and attaches the component in its ShadowRoot.
2014-11-18 15:02:38 -08:00
vsavkin f0d6464856 feat(ChangeDetector): change View to construct a WatchGroup hierarchy 2014-11-17 17:49:17 -08:00
Victor Berchet 384f0ae858 feat(Change Detection): Child watch groups 2014-11-17 17:49:17 -08:00
Tobias Bosch 7482b682d6 fix(test_lib): allow equality tests for `Map` 2014-11-17 17:47:50 -08:00
Tobias Bosch b2ecdb5da7 fix(compiler): use parentheses around expressions and escape quotes 2014-11-17 17:47:50 -08:00
Tobias Bosch 03882dcccc refactor(ElementInjector): remove stale file and make StaticKeys private 2014-11-17 17:44:39 -08:00
vsavkin daf8f72b74 feat(ChangeDetector): implement enabling/disabling records 2014-11-17 16:54:25 -08:00
Tobias Bosch 8dfbc242af refactor(benchmark): simplify writing benchmarks
Adds `benchmarks/benchpress` module and adjusts the compiler
benchmarks to use it. Also adds the Angular 1.3 benchmark
to the compiler benchmarks.

Closes #202
2014-11-17 12:27:29 -08:00
Rado Kirov be4cb2db3a feat(view): add support for instantiation of nested component views.
Include shadowDom creation and integration tests for nested components.

Fix accidentally clobbered modules/core/test/compiler/view_spec.js by
previous commit.
2014-11-14 16:09:36 -08:00
Tobias Bosch b07ea6b90e feat(compiler): add benchmarks
- compileEmptyTemplate
- compile25ElementsNoBindings
- compile25ElementsWithBindings

For the results see the PR #197.

Closes #197
2014-11-14 14:25:02 -08:00
Tobias Bosch aa9eeb80e7 fix(change_detection/lexer): support production mode
The Lexer uses the global `assert` function of Dart, which is not
yet available in JavaScript. Later on, all `assert` statements should
be automatically removed by Traceur.
2014-11-14 14:22:38 -08:00
vsavkin d7208b8429 feat(ElementInjector): add NgElement 2014-11-14 13:22:39 -08:00
vsavkin ac8351b7bc feat(ElementInjector): change ElementInjector so @parent and @ancestor do not include self. 2014-11-14 13:18:39 -08:00
vsavkin e15bcf0ffd refactor(ChangeDetector): pass formatters when instantiating a watch group 2014-11-14 13:16:55 -08:00
vsavkin 03410850b4 feat(change_detector): cleanup 2014-11-14 13:16:55 -08:00
vsavkin 34d76f1c73 feat(change_detector): add support for map literals 2014-11-14 13:16:55 -08:00
vsavkin 75fd98428a feat(change_detector): add support for array literals 2014-11-14 13:16:55 -08:00
vsavkin 0e6d52306b feat(change_detector): add support for ternary 2014-11-14 13:16:55 -08:00
vsavkin f38b94067a feat(change_detector): add support for negate 2014-11-14 13:16:55 -08:00
vsavkin 4e38e3a96c feat(change_detector): add support for method calls 2014-11-14 13:16:55 -08:00
vsavkin dcd905ae85 feat(change_detector): add support for formatters 2014-11-14 13:16:55 -08:00
vsavkin 79a9430f2c feat(change_detection): add support for binary operations and literals 2014-11-14 13:16:55 -08:00
Rado Kirov b8e3617a1d refactor(annotations): replace Module functions with plain lists.
Renames:
elementServices -> shadowDomServices.
2014-11-14 13:03:24 -08:00
Tobias Bosch 1b79c91320 fix(compiler, view): centralize TemplateElement checks and fix inconsistencies
Fixes #189
Closes #194
2014-11-14 11:04:18 -08:00
Tobias Bosch 5e0ff2cbb7 refactor(ElementBinder): Store componentDirective and templateDirective as well. 2014-11-13 17:36:45 -08:00
Tobias Bosch 352b6406ad fix(BaseException): Support stack traces in BaseException 2014-11-13 17:32:56 -08:00
Tobias Bosch 7308a3acc7 refactor(ElementInjector): support components
- Allow to access containing component directive instance from the shadow DOM.
- Allow to access app services of the app level injector of the component
  when the component is instantiated.
2014-11-13 17:32:52 -08:00
Tobias Bosch 7a70f8f92d feat(compiler): initial version of the compiler.
Supports:
- binds text nodes, element properties and directive properties
- locates decorator, component and template directives.
- inline templates of components

The compiler is built using a pipeline design,
see core/src/compiler/pipeline package.

Integration tests to show how the compiler, change_detection and DI work
together:
core/test/compiler/integration_spec.js
2014-11-11 17:55:50 -08:00
Sekib Omazic 62efb56b0a fix(lang): fix small typo. 2014-11-11 16:59:29 -08:00
Sekib Omazic 398571e3e4 docs(di): simple typo 2014-11-10 17:07:57 -08:00
vsavkin 90fd1a9227 refactor(Parser): cleanup 2014-11-07 16:21:12 -08:00
Alxandr cb276fe412 Fixed small typo in example
Closes #165
2014-11-07 16:20:38 -08:00
Vojta Jina d16d6a02ab feat(transpiler): class fields for Dart 2014-11-07 10:29:48 -08:00
Vojta Jina b4ff802e28 feat(deps): update Traceur 0.0.74 2014-11-07 10:29:48 -08:00
vsavkin a1c6f1bbe9 refactor(Key): extract KeyRegistry to remove the need in `Key.clear` 2014-11-06 10:56:45 -08:00
vsavkin 9448d78aa8 refactor(ProtoElementInjector): change `instantiate` to take positional args 2014-11-06 10:13:07 -08:00
vsavkin b5f6417635 refactor(ElementInjector): use `index` instead of the `elementInjector` field to instantiate element injectors 2014-11-06 10:03:20 -08:00
vsavkin 7908533336 refactor(Parser): cleanup 2014-11-06 09:59:22 -08:00
vsavkin 693489ce38 refactor(Parser): cleanup 2014-11-06 09:11:13 -08:00
vsavkin 7b777b1f71 feat(Parser): add support for method invocations 2014-11-06 09:11:13 -08:00
vsavkin 977bc77c96 feat(Parser): improve error handling 2014-11-06 09:11:13 -08:00
vsavkin ac060ed405 feat(Parser): add support for arrays and maps 2014-11-06 09:11:13 -08:00
vsavkin 8cc008bda1 feat(Parser): add support for assignments 2014-11-06 09:11:13 -08:00
Victor Berchet 0a766f4654 feat(Change Detection): Implement map changes 2014-11-05 14:02:03 -08:00
Victor Berchet 1bd304e7ab feat(Change Detection): Implement collection changes 2014-11-05 13:30:44 -08:00
Vojta Jina 2b7738c12c fix(example): make it work 2014-11-05 11:19:02 -08:00
vsavkin 18cdab7450 refactor(parser): clean up tests 2014-11-04 16:08:01 -08:00
vsavkin 03c779321f cleanup(parser): add type annotations to all AST classes 2014-11-04 15:56:43 -08:00
vsavkin 52b3838a21 feat(parser): split parse into parseBinding and parseAction 2014-11-04 15:51:56 -08:00
vsavkin 00bc9e5d56 feat(parser): add support for formatters 2014-11-04 10:47:33 -08:00
vsavkin 8a829d346b feat(parser): throw when expected an identifier 2014-11-04 09:21:28 -08:00
vsavkin c41f59c794 feat(parser): change Parser to return null when one of the operands is null 2014-11-04 09:06:46 -08:00
vsavkin a7fe25d93f feat(parser): add support for ternary operator 2014-11-03 17:25:16 -08:00
Rado Kirov 965fa1a985 feat(parser): adds basic expressions to the parser.
Mostly copy pasta from angular.dart.

Remove GetterFactory in favor for ClosureMap (which has basically the same
implementation).
2014-10-31 14:32:12 -07:00
Rado Kirov 8c566dcfb5 feat(elementBinder): introduce element binder.
It is a plain-old-data class to seperate the protoInjector from the
textNodes and elementBinding data.
2014-10-30 14:59:32 -07:00
Rado Kirov 91f50b67b7 feat(view): hook watch group instantiation in the view. 2014-10-29 17:04:56 -07:00
vsavkin 01e6c7b70c feat(Parser): implement Parser
Add a simple parser implementation that supports only field reads.
2014-10-29 18:29:34 -04:00
vsavkin acd7035347 feat(test_lib): change test_lib.dart to structurally compare objects 2014-10-29 18:25:32 -04:00
vsavkin 9bd65abb32 feat(ElementInjector): throw when encounter a cyclic dependency 2014-10-29 17:52:51 -04:00
Rado Kirov b0c9d05ea7 feat(view): add onChange implementation to view. 2014-10-29 13:32:20 -07:00
Tobias Bosch 08d4a37c06 feat(selector): initial version of the selector 2014-10-28 14:46:55 -07:00
Tobias Bosch d0c870fb32 feat(facade/collection): add StringMap support 2014-10-28 14:46:38 -07:00
Tobias Bosch d4c099de8c feat(facade/lang): add math and regexp support 2014-10-28 14:46:09 -07:00
Tobias Bosch cc115d58ca fix(facade/lang): use strict equality for performance 2014-10-28 14:45:50 -07:00
Victor Berchet c90a7114d3 feat(ChangeDetector): Add support for chained properties 2014-10-28 11:33:09 +01:00
Victor Berchet 63494a74bf chore(pubspec): fix a typo 2014-10-28 11:17:00 +01:00
vsavkin c11ca944d4 perf(ElementInjector): add a benchmark measuring the instantiation of element injectors without using reflection 2014-10-27 17:56:05 -04:00
vsavkin e3b772425e feat(ElementInjector): change ElementInjector to accept bindings or types 2014-10-27 17:56:05 -04:00
vsavkin 31831eee5e feat(View): implement ProtoView.instantiate 2014-10-27 17:18:35 -04:00
vsavkin 79d270c3dd feat(ElementInjector): add support for "special" objects 2014-10-27 14:14:56 -04:00
vsavkin e3548b497f feat(ElementInjector): implement ElementInjector 2014-10-27 10:16:50 -04:00
vsavkin ea0df352be feat(di): add metadata to Key 2014-10-27 10:04:12 -04:00
vsavkin 2a4b63b614 refactor(collection): use Map instead of Object 2014-10-18 17:50:55 -04:00
vsavkin 1f4caa8773 feat(benchmark): add a simple benchmark for the di module 2014-10-18 17:06:23 -04:00
vsavkin 2f732c6b84 docs(di): add docs to di module 2014-10-14 08:11:44 -04:00
vsavkin 1a7d5160f2 use Promise instead of Future 2014-10-12 17:47:52 -04:00
vsavkin f524a89cb6 feat(injector): add support for default bindings 2014-10-12 17:29:02 -04:00
vsavkin b71cd9f380 refactor(di): use boolean instead of bool 2014-10-12 17:15:58 -04:00
vsavkin 92b2559109 refactor(di): cleanup 2014-10-12 17:06:41 -04:00
vsavkin c3d9b5c91e refactor(di): simplify Injector API 2014-10-12 17:06:41 -04:00
vsavkin f0870791f6 refactor(di): cleanup to make dartanalyzer happy 2014-10-12 17:06:41 -04:00
vsavkin 97667e2591 refactor(di): make use of optional parameters 2014-10-12 17:06:41 -04:00
vsavkin 3f3fb7017e refactor(injector): implement support for nested bindings 2014-10-12 17:06:41 -04:00
vsavkin 0b60f8494d style(di): add new lines 2014-10-12 17:06:41 -04:00
vsavkin d313cac42f refactor(injector): change toFactory to use reflector to construct dependencies 2014-10-12 17:06:40 -04:00
vsavkin 06a221671c refactor(injector): cleanup 2014-10-12 17:06:40 -04:00
vsavkin 9b411372df feat(injector): change injector to recover from errors
So it can instantiate an object after a failed attempt.
2014-10-12 17:06:40 -04:00
vsavkin b9d03e6635 refactor(di): move Dependency from key.js to binding.js 2014-10-12 17:06:40 -04:00
Misko Hevery a9896ed391 design: view instantiation test 2014-10-10 20:54:33 -07:00
Victor Berchet 5527a1b1a4 feature(change detection): implement barebone ChangeDetector
fixes #39
2014-10-08 11:11:56 +02:00
Vojta Jina cfc5fdc60d chore: use es6-module-loader
Switch Traceur to use modules=“instantiate” and use es6-module-loader.
This setup supports cyclic dependencies.
2014-10-07 17:35:22 -07:00
Chirayu Krishnappa e4ce69dcc7 test(scanner): port the rest of the lexer tests from AngularDart
Closes #64
2014-10-07 16:47:50 -07:00
vsavkin 5162b3c0ca refactor(reflector): cleanup 2014-10-07 10:42:27 -04:00
vsavkin 7d566adea0 style(reflector): formatting 2014-10-07 10:34:07 -04:00
vsavkin 187c4aa33c refactor(injector): uses one instance of reflector instead of creating a new instance every time 2014-10-07 10:29:32 -04:00
vsavkin ab4f86a0cb refactor(injector): cleanup 2014-10-07 10:03:06 -04:00
vsavkin ea22cc4c7a refactor(injector): add @FIELD annotations to Key and Dependency 2014-10-07 09:39:52 -04:00
vsavkin df09a7c817 refactor(injector): add bool and int annotations 2014-10-07 09:37:45 -04:00
vsavkin 971e31fcd3 feat(facade): add bool type 2014-10-07 09:37:23 -04:00
vsavkin 4e0c368c03 refactor(injector): remove DIError 2014-10-07 09:21:00 -04:00
vsavkin 62004e22e0 feat(injector): change injector to show the full path when error happens in a constructor (async) 2014-10-07 09:04:11 -04:00
vsavkin e7666d0612 feat(injector): handle async cyclic dependencies 2014-10-06 16:24:12 -04:00
vsavkin a0176273c5 feat(injector): implement InjectLazy 2014-10-06 15:03:05 -04:00
vsavkin e02cdfe733 feat(injector): handle in-progress async construction 2014-10-06 15:03:05 -04:00
vsavkin 4d6c7481ad feat(injector): handle construction errors
- Detect cyclic deps
- Handle initialization errors
2014-10-06 15:03:05 -04:00
vsavkin 14af5a0a42 feat(injector): implement async dependencies 2014-10-06 15:02:41 -04:00
vsavkin a814d48bbc refactor(injector): use @CONST to create the Inject annotation 2014-10-03 20:34:37 -04:00
vsavkin f63a5dd158 refactor(injector): change reflector to collect the resolving path only when an error occurs 2014-10-03 19:54:53 -04:00
vsavkin 15305b6cd7 refactor(facade): instantiate a fixed length array 2014-10-03 16:31:12 -04:00
vsavkin a85812f688 refactor(injector): rename humanize into stringify 2014-10-03 16:29:59 -04:00
vsavkin b2199632c7 feat(injector): initial implementaion of dynamic injector 2014-10-03 15:35:33 -04:00
Misko Hevery 6c8da62c1b fix: Enabled annotation support for Dart 2014-10-02 21:48:46 -07:00
Misko Hevery cbd429640f chore: remove hello test 2014-10-02 21:02:48 -07:00
Victor Berchet 089a2f1b62 feat(transpiler): constructor and typed field semantics
fixes #11 (constructor and typed field semantics)
fixes #42 (Should we infer class property types from ctor args ?)
fixes #17 (number (js) should map to num (dart))

Closes #45
2014-10-02 21:02:47 -07:00
Misko Hevery fd0c2d8063 design: added selector interface 2014-10-02 20:39:27 -07:00
Tobias Bosch 33af1d0b39 chore(build): execute `pub get` only if a pubspec.yaml changed and run `dart analyzer` on all dart files
`pub get` is now only executed when the `pubspec.yaml` in the `modules`
folder is different than the `pubspec.yaml` in the `build/dart` folder.

Generates the file `build/dart/_analyzer.dart` that imports all modules
to run `dart analyzer` against all of them. The build will fail whenever
there are errors, warnings or hints in `dart analyzer`.

Changes the sources so that `dart analyzer` does not report any
error, warning or hint.

Closes #40
2014-10-02 16:10:08 -07:00
Misko Hevery f9923ea7db test: add example test for change_detection 2014-10-01 22:17:14 -07:00
Chirayu Krishnappa 78d758b4bb fixes to get tests green with karma dart 2014-10-01 19:58:22 -07:00
Chirayu Krishnappa d7d52aaef2 refactor(lexer): rename to scanner, use ints, etc. 2014-10-01 17:06:17 -07:00
Chirayu Krishnappa 3482fb1291 feat(facade/lang): support int 2014-10-01 17:06:17 -07:00
Chirayu Krishnappa c85ab3a5a4 feat(lexer): initial (wip) implementation. 2014-10-01 12:50:44 -07:00
Misko Hevery 69210e4fde design: add test change_detection 2014-09-30 17:02:33 -07:00
Misko Hevery e3254d4a7d design: update change_detection 2014-09-30 15:57:05 -07:00
Tobias Bosch c79f0c3472 refactor: simplify and make tests work in JS and Dart
* remove `wraps` syntax enhancements for imports
  and support new `import * as module from ...` syntax

  - default imports are the wrong construct for importing
    everything from a module

* moved tests from transpiler to jasmine and karma

  - transpiler tests are included when running karma in main project folder
  - transpiler is reloaded after every test run in karma,
    so no need to restart karma when the transpiler has been changed.
  - removed own gulp build for transpiler and `postinstall.sh`
    as they are no more needed.
  - transpiler tests are now executed in Dart AND JavaScript (used to be executed
    only in Dart), which allowed to catch some bugs (see the bug with the
    import specification above).

* made tests work in dart as well by using the following hack:

  - dependencies are loaded from the `build` folder, which makes
    running `gulp build` necessary before running karma for dart
  - for this to work,
    the dependencies are included in main `pubspec.yaml` of project
  - reason for the hack: `karma-dart` loads all `packages` urls
    directly from disc (should rather use the karma file list)

* added explicit annotations `FIELD`, `ABSTRACT`, ... to `facade/lang.*`

  - needed for now that we can run tests and don't get errors for undefined
    annotations.

* added `README.md` with details about the build and tests
2014-09-28 21:50:38 -07:00
Misko Hevery 817c005845 test: added simple View test 2014-09-28 20:02:32 -07:00
Misko Hevery 9c7c7e8acf design: simplified view interfaces 2014-09-28 16:30:13 -07:00
Tobias Bosch d42fa07863 fix(examples): make todo example run again 2014-09-26 17:38:38 -07:00
Tobias Bosch c8cf03f200 refactor: move rtts-assert into `modules` directory
The rtts assertion lib is only needed for js, 
but it should be treated like any other module (e.g. facade, …)
2014-09-26 17:36:57 -07:00
Vojta Jina c3b442ea53 chore: karma with JS, Dart
Note: karma with dart is still not working
because of how `karma-dart` loads `package:…` dependencies.

Usage:
```
karma start karma-js.conf.js
karma start karma-dart.conf.js
```

Make sure to set `DARTIUM_BIN` env variable.

Refactors `js2dart`:
- live outside of the traceur module (`tools/js2dart/index.js`)
  so it can be reused by gulp and karma
- automatically build the sources in memory,
  so that `js2dart` can be used without running `gulp build` first
- provide a way to specify the moduleName of a compilation run
  independently of the input filename. This helps error messages
  and source maps (not yet enabled) to report the correct file name

Changes project setup:
- add module `test_lib` that contains the primitives for tests
  (e.g. `describe`, `it`, …)
- clean up some sources that had errors in them
- module names in transpiled js and dart files don’t contain
  `lib`, `test` nor `src` any more (e.g. `di/di`).
2014-09-26 16:53:54 -07:00
Misko Hevery 6335fc407c design: add changed detection API 2014-09-26 15:12:55 -07:00
Tobias Bosch 100d66222c build: execute `pub get` and `dart analyzer`
When chaining a `pubspec.yaml` we automatically run `pub get`.

In `gulp build` we also run `dartanalyzer` for all files
that have the pattern:

`<module>/lib/<module>.dart`

Closes #13
Closes #5
Closes #2
2014-09-25 17:56:05 -07:00
Misko Hevery b42111a608 design: added record interface 2014-09-25 16:53:32 -07:00
Misko Hevery 8afa421d75 first chunk of interfaces that are valid via dart analyzer 2014-09-25 13:51:50 -07:00
Tobias Bosch 57b3297bf6 refactor: always use js2dart traceur and make examples run again 2014-09-24 20:20:59 -07:00
Misko Hevery 6e4477fc08 WIP 2014-09-19 23:03:36 +00:00
Tobias Bosch afa7616464 build - refactor 2014-09-19 13:59:28 -07:00