Commit Graph

63 Commits

Author SHA1 Message Date
vsavkin 9b3b3d325f feat(facade): added support for observables 2015-03-24 13:45:39 -07:00
gdi2290 b61b8d60b7 refactor(forEach): change to for-of with iterable
rename: foreach -> for
rename: array -> iterable
update: DartParseTreeWriter
update: naive_infinite_scroll
update: todo
fix: tests in foreach_spec

Closes #919
2015-03-21 14:19:21 -07:00
Marc Laval 52bf0def4e chore(test): improve test.unit.cjs task
Closes #998
2015-03-18 21:51:57 -07:00
Rado Kirov ce29862e2f fix(dart_libs): add _dart suffix only for reserved lib names.
Closes #871
2015-03-12 15:14:39 -07:00
Rado Kirov dd3e6271c2 chore(services): rename services.
Closes #711
2015-03-11 18:30:37 -07:00
Tobias Bosch e490861ba2 fix(docs): make them run again and integrate into ci 2015-02-26 15:38:12 -08:00
Marc Laval 85211f0a6b fix(core): workaround for circular dependencies in nodejs
Closes #716
2015-02-19 13:42:27 -08:00
Tobias Bosch cd90038950 fix(types): Add StringMap type 2015-02-18 09:53:27 -08:00
Tobias Bosch 674848648a feat(facade): add support for `Date`
Also refactors the dart transpilar to expose
the type mappings for future changes.
2015-02-17 16:02:46 -08: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 013e1faf27 fix(build): support transpile to commonjs 2015-02-11 13:09:52 -08:00
Tobias Bosch 69bba9b5df feat(build): transpile to es6
Transpile all sources first to es6 which we can publish and then
to es5. Also merge the generated source maps into once map.
2015-02-10 11:27:22 -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
Marc Laval 6bfa48bc64 refactor(directives): Drop ng- prefix from all angular directives and rename NgRepeat to Foreach
fixes #532

Closes #539
2015-02-06 09:24:50 -08:00
Alex Eagle 93c18f5396 fix(build): Escape dollar signs in dart-transpiled string literals
Escape dollar signs in string literals - dart should not interpolate them.
Closes #509
2015-02-05 18:00:14 -08:00
Yegor Jbanov 9f6b6cc50c chore(packaging): update imports in tools 2015-02-05 15:58:15 -08:00
Alex Eagle e20d9dd073 feature(build): add nodejs-based unit test for dart transpiler.
This adds a unit test to the transpiler. Existing tests are themselves transpiled to ES5, which makes it impossible to do some kinds of assertions. For example, this will be useful to repro https://github.com/angular/angular/issues/509.
In this change, the actual issue isn't fixed. It only adds the reproduction.
It uses the jasmine test runner, since it's already used by the docs test. That uses version 1 of Jasmine, which isn't ideal, but I want to be consistent for now.
I discussed with Tobias the possibility of switching to Mocha for these nodejs-based tests, and we might do that sometime later.
2015-02-05 11:55:49 -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
Victor Berchet f04967ad37 chore(traceur): update to 0.0.79
fixes #8
2015-01-06 08:21:43 -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
Vojta Jina 7d0a83a24c chore(gulp-traceur): better error reporting
Use original filename when printing errors (instead of the output).
2014-11-05 11:42:23 -08:00
Vojta Jina 1dc5a22f07 chore: source maps for Karma/Gulp
For Karma, the source mapa are inlined inside each source file.
For `build/*` output, separate `*.map` file is created.

This changes the API of `tools/transpiler/index.js`. I believe this API
is only used in `gulp-traceur.js` and `karma-traceur-preprocessor.js`.
Instead of returning the transpiled string, `compile()` returns a result
object such as:
```js
{
  js: ‘transpiled code’,
  sourceMap: null || {}
}
```

Closes #20
2014-11-05 11:19:02 -08:00
Marc Laval e1c84e02f8 chore: adds Windows support for build
Closes #104
2014-10-28 21:04:30 -07:00
Victor Berchet 94958e084e fix(super): `super()` now means call the proto of the current function.
See https://github.com/google/traceur-
compiler/commit/6732e5eddf203ae02bcfb8faea837590bf32c061
2014-10-27 22:26:38 +01:00
vsavkin 035dc5ba44 feat(transpiler): add support for getters 2014-10-16 16:11:18 -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 ee1e54cf0a feat(transpiler): add support for named params to new expressions 2014-10-12 17:21:50 -04:00
Misko Hevery a9896ed391 design: view instantiation test 2014-10-10 20:54:33 -07:00
Vojta Jina 2d19e7122b refactor(transpiler): instanceof 2014-10-09 15:22:21 -07:00
Vojta Jina c7e9d10f0b test(transpiler): add spec for instanceof 2014-10-09 15:22:20 -07:00
Vojta Jina 85ee62cb0d chore(transpiler): show filepath when error happens 2014-10-09 15:17:53 -07:00
Vojta Jina 94e556465b fix(transpiler): only call transform/visit when defined
Our custom ParseTree classes should not expect that every
transformer/visitor defines the methods to transform/visit them.
2014-10-09 15:08:30 -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
Victor Berchet 5818c3bf28 refactor(named parameters): mimic original traceur architecture 2014-10-08 12:53:55 +02:00
Vojta Jina 38340ce8d9 test(transpiler): add a cycle import spec 2014-10-07 17:35:22 -07:00