Commit Graph

16171 Commits

Author SHA1 Message Date
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
vsavkin 64fe73e20d feat(transpiler): handle named params 2014-10-02 17:31:04 -04: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 c7feaba1cb feat(DartWriter): support string interpolation 2014-10-01 17:06:17 -07:00
Chirayu Krishnappa c85ab3a5a4 feat(lexer): initial (wip) implementation. 2014-10-01 12:50:44 -07:00
Victor Berchet cff47d4f8e fix(DartWriter): number (js) maps to num (dart) 2014-10-01 11:22:47 -07:00
Victor Berchet 99bad64c3f doc(README): HOWTO debug the transpiler 2014-10-01 17:32:59 +02:00
Misko Hevery 69210e4fde design: add test change_detection 2014-09-30 17:02:33 -07:00
Vojta Jina 934f31a4fa chore: fix karma dart setup 2014-09-30 16:58:02 -07:00
Misko Hevery e3254d4a7d design: update change_detection 2014-09-30 15:57:05 -07:00
Victor Berchet 64d3cc68f0 refactor(transpiler): split the monolithic dart transformer
fixes #24

The new architecture conforms with the Traceur architecture.
2014-09-30 16:15:35 +02:00
Victor Berchet 92375c0281 chore(README): update instructions 2014-09-30 14:21:46 +02:00
Tobias Bosch 85b5543f62 feat: travis-ci integration 2014-09-29 16:33:53 -07:00
Tobias Bosch 1907c590c8 refactor: removed stale build file 2014-09-29 14:21:38 -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 39c03e67e6 refactor: rename `js2dart` to `transpiler` 2014-09-26 17:44:42 -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 7e3005e705 fix(js2dart): make tests work again 2014-09-26 09:54:32 -07:00