Commit Graph

54 Commits

Author SHA1 Message Date
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
Tobias Bosch f6284f2a55 feat(benchpress): rewritten implementation
Limitations:
- cloud reporter is not yet supported any more
2015-02-16 11:43:27 -08:00
Tobias Bosch 013e1faf27 fix(build): support transpile to commonjs 2015-02-11 13:09:52 -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
Tobias Bosch dd532fee72 feat(build): add package.json and README.md for publishing to npm 2015-02-10 11:52:42 -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
Yegor Jbanov 320c089dcc feat(packaging): automatically copy LICENSE to dist folders 2015-02-09 14:02:42 -08:00
Tobias Bosch 713b670a76 fix(tests): show stack traces for transpiler unitttests 2015-02-06 17:02:45 -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 b1e76c550e feat(build): auto format the generated dart code.
Fixes #480
Closes #504
2015-01-30 11:10:12 -08:00
Marc Laval ee99a5a02b chore: gulpifying the tests
Closes #168
2015-01-22 16:15:17 -08:00
Edouard Coissy a8bc7aa48f chore(gulpfile): add build/clean.docs task 2015-01-20 14:11:12 -08:00
Tobias Bosch d02c0accbb refactor(benchmarks): add cloud reporter, add params
- adds console and cloud reporter (via Google BigQuery).
- makes parameters of tests explicit and modifiable.
- removes `detect` and `ignoreGc` mode from benchpress
  as these can result in unstable numbers.
2015-01-15 09:09:05 -08:00
Tobias Bosch fe2a09bc7f refactor(perf): e2e tests and benchpress should be written in es6 2015-01-06 15:32:49 -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 df21c3c77d feat(zone): add support for long stack traces 2014-12-17 14:56:54 -08:00
vsavkin de855a79b9 fix(build): run dartanalyzer after transpiler and html to avoid races 2014-12-12 16:24:36 -08:00
vsavkin 9891312495 chore(gulpfile): add zone.js to the list of deps 2014-12-12 15:24:30 -08:00
Tobias Bosch 1cd848df55 fix(build): analyze examples and benchmarks again 2014-12-08 12:00:48 -08:00
Tobias Bosch bc6f0dba46 fix(build): `gulp build.js.prod` should call `benchpress.js.prod` 2014-12-08 11:44:44 -08:00
Peter Bacon Darwin 83a6a1cc0b chore(docs): fix docs/watch task name 2014-12-06 11:26:08 +00: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 e32ddcc7eb chore(gulp): don't run pub get in parallel to avoid a race condition 2014-12-05 12:32:46 +01:00
Victor Berchet 24d190c9a8 chore(build): replace deprecated gulp-rimraf by node del
see
0bb073de44/docs/recipes
/delete-files-folder.md
2014-12-05 12:31:37 +01:00
Peter Bacon Darwin 27e03591dd chore(docs): initial dgeni docs generation
Closes #261
2014-12-04 14:17:08 +00:00
Victor Berchet 5857c9f767 chore(gulp): Skip Dart tasks when the SDK is not detected
fixes #268
2014-12-04 10:01:55 +01:00
vsavkin 6187b80ce6 benchmark(compiler): add a benchmark measuring view instantiation in AngularDart 1.0 2014-11-25 17:46:11 -08:00
Ciro Nunes 2797075200 chore: use load-plugins to make gulpfile shorter 2014-11-24 18:24:15 -08:00
Marc Laval ead2769dd6 fix(examples): hello-world app on Windows 2014-11-23 15:39:23 -08:00
Tobias Bosch 41856ad3f0 fix(build): don’t do `pub get` until all pub specs have been copied
Fixes #130
Closes #227
2014-11-19 17:29:18 -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
vsavkin b87891d77c chore: change the built task to ignore "unused import" errors 2014-11-14 13:16:56 -08:00
Vojta Jina d16d6a02ab feat(transpiler): class fields for Dart 2014-11-07 10:29:48 -08:00
Vojta Jina 4a753926b4 chore: fix modules/build.dart/pubspec
This was failing on Travis because the `pub install` would run before
copying of `pubspec.yml` happened. In fact, I don’t understand how this
worked at all because `gulp.dest` seems to be not forwarding files and
so anything after `gulp.dest` does not get called at all.

Here is the failing Travis build:
https://travis-ci.org/angular/angular/builds/40005692

This changes `modules/build.dart/pubspec` task to use `gulp-changed`
instead of a custom implementation and use a wrapper around `gulp.dest`
to forward files.
2014-11-05 11:19:02 -08:00
Vojta Jina 2b7738c12c fix(example): make it work 2014-11-05 11:19:02 -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 cc502c81d6 chore(gulp): cleanup gulp file
- remove duplicated path & readline deps,
- order dep alphabetically.
2014-10-28 11:45:48 +01:00
vsavkin e3548b497f feat(ElementInjector): implement ElementInjector 2014-10-27 10:16:50 -04:00
vsavkin 1f4caa8773 feat(benchmark): add a simple benchmark for the di module 2014-10-18 17:06:23 -04: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
Tobias Bosch 85b5543f62 feat: travis-ci integration 2014-09-29 16:33:53 -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
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
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 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