Commit Graph

430 Commits

Author SHA1 Message Date
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
Tobias Bosch e5224d2cb3 chore(build): make watch faster / only build what is needed 2014-09-21 22:02:28 -07:00
Tobias Bosch 45f8a51194 build: prevent infinite loop during install 2014-09-20 18:40:16 -07:00
Misko Hevery e45ecd6d58 chare: changed gulp to support test folder 2014-09-19 16:37:56 -07:00
Tobias Bosch afa7616464 build - refactor 2014-09-19 13:59:28 -07:00