Commit Graph

34 Commits

Author SHA1 Message Date
Alex Eagle 4c1e978536 cleanup(build): remove traceur-based Dart transpiler 2015-04-28 16:25:10 -07:00
Martin Probst 3285ffba16 fix(traceur): Fix a couple of unsupported or incorrect tests. 2015-04-09 18:03:27 -07:00
Caitlin Potter 9d21a6f40d chore(package.json): upgrade traceur to v0.0.87
Fix in source-map test to follow through the sourcemap chain.
2015-03-26 18:37:03 -07:00
Rado Kirov dd3e6271c2 chore(services): rename services.
Closes #711
2015-03-11 18:30:37 -07:00
Tobias Bosch 44845839a6 fix(transpiler): support arrow functions with complex body in named arguments 2015-02-16 10:48:44 -08:00
Tobias Bosch f39c6dc2c7 fix(setup): use upstream traceur with explicit patches
Also correct the transpile to ES6

Also support generics correctly

All patches are hooked in via `/tools/transpiler/index.js`
https://github.com/google/traceur-compiler/issues/1700
https://github.com/google/traceur-compiler/issues/1699
https://github.com/google/traceur-compiler/issues/1708
https://github.com/google/traceur-compiler/issues/1625
https://github.com/google/traceur-compiler/issues/1706
2015-02-06 17:04:08 -08:00
Yegor Jbanov 9f6b6cc50c chore(packaging): update imports in tools 2015-02-05 15:58:15 -08:00
Tobias Bosch 05ffdc9b44 refactor(build): explicitly mention `src` folder in imports
Export files are now directly under the module folder,
e.g. `core/core.js`. With this, an import like `core/core`
won’t need a path mapping (e.g. via `System.paths`) any more.
This adds the `src` folder to all other import statements as well.
2015-02-05 11:55:48 -08:00
Tobias Bosch 62f08d38db fix(tests): don’t fail on current chrome canary 2015-01-28 17:01:32 -08:00
Vojta Jina 0f8f4801bd chore: use fork Traceur with disabled getters/setters
It also includes better debugging class method names for WTF.
2015-01-08 16:03:32 -08:00
vsavkin f06433fb58 feat(test_lib): implement SpyObject 2014-12-29 13:27:17 -08:00
vsavkin 965f70bfbe feat(transpiler): implement @IMPLEMENTS 2014-12-29 12:29:00 -08:00
Tommy Odom f088e9ef15 feat(transpiler): Transform for..of to Dart as for..in
fixes #53
2014-12-03 10:48:48 +01: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 f864aa1f8e fix(class fields): handle untyped fields 2014-11-19 23:12:14 +01:00
Vojta Jina c68e78075a feat(transiler/dart): re-export imported vars
```
import {Foo} from ‘./foo’;
var localVar = true;
export {Foo, localVar};

===>

import ‘./foo’ show Foo;
export ‘./foo’ show Foo;
var localVar = true;
```

Closes #41
2014-11-12 07:01:14 -08:00
Vojta Jina c5153175b6 fix(transpiler/dart): re-exporting only some bindings
```
export {Foo, Bar} from ‘./foo’;
==>
export ‘./foo’ show Foo, Bar;
```
2014-11-12 07:01:14 -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
Tommy Odom 93f6d26f68 feat(transpiler): Transform template strings to triple quoted Dart strings 2014-11-10 16:49:51 -08:00
Rado Kirov 4f416694a5 bug(transpiler): Support optional arguments in annotations.
Clean-up: move annotaitons out of fixtures/annotations, since we have
the @CONST annotation in the transpiler already.
2014-11-10 13:47:30 -08:00
Vojta Jina d16d6a02ab feat(transpiler): class fields for Dart 2014-11-07 10:29:48 -08:00
Tommy Odom 8e6326f838 feat(transpiler): allow @CONST annotation on class
Closes #148
2014-11-05 15:44:34 -08:00
vsavkin 035dc5ba44 feat(transpiler): add support for getters 2014-10-16 16:11:18 -04:00
vsavkin ee1e54cf0a feat(transpiler): add support for named params to new expressions 2014-10-12 17:21:50 -04:00
Vojta Jina c7e9d10f0b test(transpiler): add spec for instanceof 2014-10-09 15:22:20 -07:00
Victor Berchet d1b90e125b feat(transpiler): add support for arrow functions
fixes #28
2014-10-09 14:44:07 -07:00
vsavkin 1214f423b4 feat(transpiler): implement optional params 2014-10-09 14:27:32 -07:00
Vojta Jina 38340ce8d9 test(transpiler): add a cycle import spec 2014-10-07 17:35:22 -07: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
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
vsavkin 64fe73e20d feat(transpiler): handle named params 2014-10-02 17:31:04 -04:00
Chirayu Krishnappa c7feaba1cb feat(DartWriter): support string interpolation 2014-10-01 17:06:17 -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
Tobias Bosch 39c03e67e6 refactor: rename `js2dart` to `transpiler` 2014-09-26 17:44:42 -07:00