Commit Graph

451 Commits

Author SHA1 Message Date
Tim Blasi cb4ff7491a chore(dart/transform): Integrate protoc into gulp build
This change detects if the user has `protoc` available and, if so, uses
it to generate `.pb.dart` files. If not, pre-built files are used
instead.
2015-09-15 08:39:07 -07:00
Jeremy Elbourn bfbce542e6 chore(material): add unit tests for MdButton. 2015-09-14 14:36:57 -07:00
Rado Kirov cac25fe003 chore(build): replace traceur-runtime with es6-shim.
This removes traceur as a dependency for the t push -f
angular2 build.

Closes #4148
2015-09-14 21:02:29 +00:00
Rado Kirov de9dc55852 chore(bundles): switch bundler tool input from es6 to es5.
Http sfx bundle was not regenerated when bundles.js task was called.

The new bundles are a bit bigger (angular2.min.js 519604 -> 590056 bytes).
Part of it is because TS inlines class shims vs defering to
TraceurRuntime.

BREAKING CHANGE:

TraceurRuntime is no longer need when consuming the angular 2 bundles.
Shims or native support for ES6 Map, Set and Symbol are still needed (can be
provided by es6-shim.js or core.js).

Closes #4141
2015-09-11 23:11:11 +00:00
Rado Kirov e9ad100b1f fix(build): switch to cjs output for es5.
System output does not work at the current versions of TS and
system.js. Will revisit after upgrading TS.

Removes unused traceur tooling.

Closes #3974
2015-09-04 23:10:34 +00:00
Alfonso Presa 12a8064c27 chore(gulpfile.js): Fix some hint issues in gulpfile.js
Closes #3905
2015-09-01 05:01:39 +00:00
Jason Teplitz 3468f7cfd5 chore(build): Add WebWorker bundle.
Closes #3207

Closes #3881
2015-08-28 20:40:16 +00:00
Pawel Kozlowski a94f051d43 fix(bundle): don't include System.config in dev bundle
Fixes #3826

Closes #3862
2015-08-27 17:20:03 +00:00
Jeff Cross 8ed22ce6e7 chore: update all import paths 2015-08-25 15:33:23 -07:00
Jason Teplitz 5f6b7ffadb chore(build): Fix flaky builds caused by doc generation.
Closes #3836
2015-08-25 21:29:45 +00:00
Jason Teplitz 6d2345accb chore(build): Fix test.unit.dart and test.unit.dartvm transformer load errors
Closes #3832
2015-08-25 19:47:58 +00:00
Marc Laval bf4b75ee9c fix(build): error when running `npm test` locally
Closes #3806
2015-08-25 15:46:27 +00:00
Jeff Cross 88a5b8da0f chore(transform): move transform module to modules_dart
The build/pure-packages.dart gulp task has also been updated to move the files into the angular2 tree.
Closes #3729
2015-08-24 03:39:07 +00:00
Brian Ford 06487237e5 Revert "Revert "feat(router): add angular 1.x router""
This reverts commit 298f1fb6a6.
2015-08-20 13:19:34 -07:00
Victor Berchet 298f1fb6a6 Revert "feat(router): add angular 1.x router"
This reverts commit fde026a9e4.
2015-08-20 08:06:14 -07:00
Brian Ford fde026a9e4 feat(router): add angular 1.x router 2015-08-19 20:27:39 +00:00
Misko Hevery 284dc67076 chore: disable dart for HTTP package
BREAKING CHANGE

Stop supporting http module in Dart. This is because Dart has a
well developed http package which should be used by Dart
customers instead.
2015-08-13 21:18:31 +00:00
Yegor Jbanov 280d8f3148 chore: add dartdoc compliance checks to build
Closes #3582
2015-08-11 22:53:08 +00:00
Jeff Cross 5a405011de refactor(http): move http files to top-level module
Closes #2680
Closes #3417
2015-08-11 22:32:17 +00:00
Pawel Kozlowski 1562bc91ba chore(build): don't use global module format in router bundle
Empty ES6 files are detected as "global" module format by
default which means that we end up with 2 module formats in
a bundle (es6 and global). This makes module loading more
complex and make break with certain SystemJS builder / loader
combinations.

Fixes #3528

Closes #3561
2015-08-10 19:56:04 +00:00
Jeremy Elbourn bd498977bd chore(material): clean up old workarounds with new features. 2015-08-06 17:54:34 -07:00
Brian Ford 450d3630cc test(router): add tests for router.d.ts
Closes #3282
2015-08-05 00:29:32 +00:00
Alex Eagle 3c58878b19 chore(build): Upgrade to TypeScript@1.5.3
This change also makes us compliant with 1.6.0-dev compiler,
so we can do some experiments with apps that use 1.6 features
and compile against Angular.

We should probably add a travis build for 1.6 so we stay compatible
with both versions.
2015-07-31 20:01:27 +00:00
Alex Eagle c08403935f chore(build): faster feedback for broken lint
Originally we ran gulp enforce-format at the beginning of the build.
This was annoying because you came back from lunch to find that no tests
ran so you have to start your PR over.
Then we changed it to run the linters at the end. This is annoying because
you might be ready to merge to master, and could have fixed the lint
issues immediately, but now much wait for another PR.
The solution is to run the lint checks in another build. This marks
your PR red very early, but you still get the feedback of whether the
tests are passing.
2015-07-30 20:22:41 +00:00
Marc Laval eebd736cfe feat(build): initial SauceLabs setup
Closes #2347
2015-07-27 16:15:28 -07:00
Rado Kirov bb50cda181 chore(gulp): moves bundles to dist/js/bundles
- renames bundle.js.deps to bundles.js.
- makes all other bundle tasks private.

Closes #3286
2015-07-27 16:12:24 -07:00
Alex Eagle 19d8b221b4 fix(typings): test our .d.ts with --noImplicitAny
This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.

See #3195
2015-07-24 11:24:44 -07:00
Yegor Jbanov 49dc819d23 chore(build): add experimental Dart build that uses DDC for code analysis 2015-07-23 11:30:00 -07:00
Tobias Bosch 231962aaf7 chore: add serve.e2e.dart task for easy benchmark development 2015-07-22 10:08:56 -07:00
Alex Eagle 51e6f33d32 chore(build): Make PRs 15m faster.
Don't precompile Dart2JS for pull requests, instead serve the dart
sources with pub serve. We were already testing with Dartium so
all we lose is some test coverage of defects exposed only by the
Dart2JS transpiler.
This still runs the dart transformer.

Fixes #3030
2015-07-21 22:14:38 -07:00
Alex Eagle de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
Jeremy Elbourn f25e43fab8 chore(build): add material css to dart build. 2015-07-15 15:36:22 -07:00
Alex Eagle 93055f78ea chore(lint): require semicolons
Relying on ASI (automatic semicolon insertion)
is allowed in TypeScript because JavaScript allows
it. However, when we run clang-format it doesn’t
understand that these statements are terminated
with a newline and changes the indentation, in bad
cases even breaking the code.

Fixes #817
2015-07-15 12:57:32 -07:00
Mark Ethan Trostler 1eab4f5f07 feat(license): include license files in dev and dev.sfx bundles 2015-07-13 14:01:56 -07:00
Peter Bacon Darwin 9fa7d38133 chore(doc-gen): put typescript stuff into its own package
This means that we can now run just the d.ts file generation by running:

```bash
gulp docs/typings
```

In addition the type definition generation was messing with the other docs tasks
so separating it also fixes problems there.
2015-07-11 07:21:45 +01:00
Julie Ralph 71c65b47f9 feat(test): add test bundle
Create a bundle for the test library, TestComponentBuilder,
TestInjector, and DebugElement.

Internal tests use a superset of the bundle.
2015-07-09 18:07:48 -07:00
Igor Minar ac24a301bd build(gulp): remove the tmp cleanup code
this is no longer necessary and if anyone runs two gulp processes in parallel can actually cause
issues because once one of the processes ends, it delets the tmp dir which can affect the remaining
process
2015-07-02 23:21:05 -07:00
Victor Berchet f020a5cdea chore(gulp): add a task to print dart & pub versions 2015-07-01 17:54:23 +02:00
Igor Minar de05d1bf46 build: speedup test.untit.dart by removing unneeded pub symlinks
This is an alternative to #2778. All of the symlinks to packages directory within the test directory
are not needed for running tests, so we can safely remove them. This removes 80k files from the test directory
which significantly speeds up Karma.

Closes #2437
2015-06-30 21:55:35 -07:00
Jeff Cross fa7da0ca5d revert: "build: speed up karma run by passing in list of dist files that changed"
This reverts commit 7fc1ee67d1.

This commit caused the build to break.
2015-06-30 14:44:44 -07:00
Igor Minar 7fc1ee67d1 build: speed up karma run by passing in list of dist files that changed
This change causes the build system to write a log file into the tmp folder after each build.
This file contains command line arguments that tell karma about all the added/changed/removed files
from the last build. Karma can then use this list instead of doing internal globbing which can be
very expensive especially for hte dart builds that contain thousands of files.

Closes #2437
2015-06-30 11:53:47 -07:00
Alex Eagle bc585f2724 feat(build): add tslint to the build.
The first enabled rule enforces return types
declared on non-private (underscore-prefix)
methods that return something.
2015-06-29 15:31:41 -07:00
Tobias Bosch d629ed7d5b fix(bundle): don’t bundle traceur/reflect into benchpress - amended change
Don’t need to bundle them as they are already
present in G3. I.e. the benchpress bundle
only includes benchpress and Angular2 bits.

Also removes adding license headers for now,
as we only have one license.
2015-06-29 15:03:15 -07:00
Tobias Bosch da4de21f28 fix(bundle): don’t bundle traceur/reflect into benchpress
Don’t need to bundle them as they are already
present in G3.
2015-06-29 11:30:34 -07:00
uber5001 c4e10ea9ac chore(benchpress): add browserify bundling
Use browserify to bundle benchpress and its dependencies.
2015-06-29 10:29:59 -07:00
Martin Probst 1f7296c093 feat: upgrade clang-format and gulp-clang-format.
This makes sure just running clang-format will use whatever version is
used in the project, by loading it from the closest node_modules folder.

It also moves the clang-format dependency to the top and explicitly
passes it to gulp-clang-format, giving us more control over the version
used.
2015-06-25 22:55:58 -07:00
Jeff Cross 1c8a58963c fix(build): fix paths in `test.typings` task 2015-06-24 21:18:46 -07:00
Daria Jung 24646e7eb8 feat(typings): add typing specs
add test in gulpfile which will compile a basic TS file with generated
angular2.d.ts to ensure generated d.ts is valid syntactic TS

Adds support for enums in .d.ts generation pipeline.
Removes renaming reexports in http module.
2015-06-23 18:22:47 -07:00
Igor Minar 7b2f757b2b build(gulp/travis): move circular check and style check to before pre/post-test tasks
In order to speedup the startup time of test.unit.js task, we are moving the circular dependency check into
a pre-test check that executes only on travis. Similarly we are moving the style check to a post-test check
that executes on travis.

This way if a circular dependency issue occurs, we find it before running tests on CI and if the code
is not formatted we fail the build only if all the tests pass.

Related to #2536
Related to #2094
2015-06-23 10:52:08 -07:00
Brian Ford 2932377769 feat(mock): add mock module and bundle
Closes #2325
2015-06-22 16:14:25 -07:00
Matias Niemelä 85b8a15374 chore(build): add a task to watch and render examples and e2e tests for production
You can now run `gulp serve.e2e.prod` to instantiate a task that watches
and compiles example and module files into the prod directory in dist
and then allows the code to be run via protractor.

Closes #2369
2015-06-19 18:57:41 -04:00
Peter Bacon Darwin aadaa20706 chore(doc-gen): clean dist/angular.io folder when generating those docs 2015-06-19 19:04:41 +01:00
Martin Probst 1c2abbc61d feat: upgrade to clang-format v1.0.19.
This fixes a performance regression with arrow
functions, allowing us to re-enable formatting for
the specs.
2015-06-12 09:51:57 -07:00
Rob Wormald 796fc66771 chore(build): rename .es6 files to .js
Change es6 source files in npm distribution to use .js extensions.

Closes #2447
2015-06-11 17:22:19 -07:00
Matias Niemelä 6cafaba993 chore(test): setup a gulp task for quickly running e2e tests against the dev server 2015-06-11 16:58:32 -07:00
Matias Niemelä 60b97b27fa fix(build): ensure that asset files are copied over to example directories 2015-06-11 16:58:23 -07:00
Daria Jung 76797dfbd4 fix(build): Minify files for angular2.min.js bundle
Uglify files related to angular2.min.js bundle in one task.

Include reflect.js in the bundle, which was previously missing. Minify reflect.js, zone.js, and angular2.min.js using uglify.
2015-06-11 13:18:04 -07:00
Marc Laval 37f8fd6551 chore(windows): fix !test.unit.js/karma-run and !test.unit.dart/karma-run tasks
Closes #2431
2015-06-11 10:45:25 +02:00
Tim Blasi 76beaa2097 refactor(change detect): Clean up change detector test layout
- Rename simple_watch_config > change_detector_config
- Add a bunch of comments explaining what's going on with the change
  detector tests.

Closes #2468
2015-06-10 16:09:48 -07:00
Jeff Cross 21568106b1 feat(http): add basic http service
This implementation only works in JavaScript, while the Observable transpilation
story gets worked out. Right now, the service just makes a simple request,
and returns an Observable of Response.

Additional functionality will be captured in separate issues.

Fixes #2028
2015-06-09 10:00:04 -07:00
Igor Minar 5df56b47d6 build(gulp): don't double build during init of serve.js.dev 2015-06-08 23:35:31 -07:00
Igor Minar fda8b1d87c build(gulp): don't try to run cleanup.builder task if builders were not initialized 2015-06-08 13:05:04 -07:00
Igor Minar 7140c9cc34 build: make 'npm install' work reliably and issue build warning when node_modules look stale
This is done a in bit kludgy way on purpose so that it works on Windows and CI.

Works around npm/npm#8452.

Closes #2038
2015-06-08 13:05:04 -07:00
Igor Minar f3dd9b5b31 build(clang-format): skip formatting of spec files until angular/clang-format#11 is fixed
otherwise checking format and reformatting takes 50seconds or more :-(
2015-06-06 15:07:01 -07:00
Tobias Bosch 46eeee6b5e feat(build): add `test.unit.dartvm` for a faster roundtrip of dartvm tests 2015-06-05 13:11:23 -07:00
Martin Probst f999d5a156 chore: move to clang-format 1.0.17.
clang-format 1.0.17 substantially improves formatting for fat arrow functions
and array literal detection. It also fixes a number of minor formatting issues.
2015-06-03 15:27:27 -07:00
Brian Ford f74d7727ca fix(build): remove nonexistant dart format task from gulpfile 2015-06-03 15:03:29 -07:00
Brian Ford 381d4cb30a fix(gulp): prevent duplicate error messages
Closes #2021
2015-06-03 14:42:24 -07:00
Caitlin Potter be88cc7697 chore(build): watch logger should honor `ignoreInitial` option
It was confusing because the test.unit.dart task does ignore the initial, and
the logger was hardcoded to always ignore the first task, leading to the appearance
that a run was happening twice for no reason.

Also, fixed the "fake ignoreInitial" handling to not rely on a fake event, which
is not necessary.

Closes #2101
2015-06-02 14:07:36 -04:00
Tim Blasi 8bcfb2d465 chore(dart/change_detect): Fix test.unit.dart gulp target
Include Change Detector generation in the `test.unit.dart` gulp task to
fix the change detection unit tests.

Closes #2236
2015-06-01 16:15:53 -07:00
Ivo Gabe de Wolff 6f0631c978 build(gulp): remove unnecessary stream merging in build.tools
Also remove the reporter config which is wrong and has no effect.

Closes #2209
2015-05-29 16:11:43 -07:00
Caitlin Potter e5d06e479a feat(broccoli): add incremental dartfmt plugin
Closes #2211
2015-05-29 18:55:37 -04:00
Tim Blasi 8a3b0b366f feat(dart/transform): Generate ChangeDetector classes
Use the `ProtoViewDto` created by the render `Compiler` to create a
`ChangeDetectorDefinition`.

From there, generate a subclass of `AbstractChangeDetector` for each
`ChangeDetectorDefinition`.

Run some basic unit tests for the dynamic and JIT change detectors on
pre-generated change detectors.
2015-05-29 14:48:53 -07:00
Jeff Cross e323c07ab9 refactor(benchpress): convert src and test to typescript
Fixes #2007
2015-05-29 14:02:58 -07:00
Igor Minar 533c64d4ea build(gulp): remove obsolete watch.js.dev build task 2015-05-28 11:44:37 -07:00
Alex Eagle 16447ce75c chore(build): improve messaging when using clang-format 2015-05-22 10:10:22 -07:00
Caitlin Potter e50f537667 build(gulp): turn off dartfmt logs by default
Closes #2105
2015-05-22 12:18:42 -04:00
Rado Kirov 05fa9bc9fb feat(router): add the router bundle to the bundle task. 2015-05-22 15:31:09 +02:00
Igor Minar 5ed091e260 build(gulp): fix test.unit.dart
- format code for the first run
- don't run tests if first build fails

Closes #1647
2015-05-21 23:50:56 -07:00
Igor Minar dee4ecbb3f build(gulp): fix typo in the npm version warning message 2015-05-20 11:32:46 -07:00
cexbrayat ec90fcd290 build(test): remove unecessary require in karma.conf 2015-05-20 08:28:38 +02:00
Igor Minar d18463dcdc build(gulp): exec karma run in a new process to avoid duplicate output
This is not an ideal solution, but I couldn't find another way to supress the output from the runner.

Closes #1813
2015-05-19 23:15:53 -07:00
Igor Minar f9f917bfa4 build(gulp): fix cleanup.builder task
- wait for the cleanup to finish (it's async) before exiting on ctrl+c
- wait for the cleanup to finish (it's async) onBeforeExit
- remove tmp directory during onBeforeExit to cleanup past leaks

Closes #1919
2015-05-19 23:15:53 -07:00
Igor Minar e89bf01c2b build(gulp): don't throw exceptions on exit when angularBuilder was not initialized 2015-05-19 23:15:53 -07:00
Igor Minar d04a515eb0 build(gulp): refactor existing cleanup tasks
the current complexity is unjustified necessary
2015-05-19 23:15:53 -07:00
Caitlin Potter d9ceb42bfe chore(gulp): log message when tasks triggered by watch
Closes #1882

Closes #1893
2015-05-18 14:34:36 -07:00
Igor Minar 77bf90dff1 build(gulp): don't print stack from jasmine handler failures in ci mode
jasmine already logs all the test failures so that stack is redundant.
2015-05-14 10:01:07 -07:00
Caitlin Potter b1ef30aa20 test(watch): add some test coverage for watch build plugin
Closes #1890
2015-05-14 04:44:38 -04:00
Igor Minar 47b8b48ee7 build(gulp): log test errors but suppress error handling within gulp while in watch mode
if any tasks executed by gulp results in an error, gulp will try hard to show errors. these are usually irelevant in the
watch mode. this is why it's ok to supress them except when running in the ci test mode, in which case failing tasks and logging
exceptions is helpful.

Closes #1881
2015-05-13 22:25:15 -07:00
Caitlin Potter 23cec1e8e2 build(gulp): use chokidar alone instead of gulp-watch
Closes #1759
2015-05-13 19:21:35 -04:00
Igor Minar 718d2ae2ee build(gulp): run beforeExit hook only once
this prevents inifinite loops when cleanup task registers an additional task, that triggers a new beforeExit event

Fixes #1833
2015-05-13 00:57:13 -07:00
Igor Minar 772b529a8e build(gulp): bump the required node version to 0.12.2
We ran across fatal issues with npm shrinkwrap on node 0.10.x which don't go away even with npm 2.9.x.

Upgrading node to 0.12 fixed the shrinkwrap issues. Since now we run node 0.12 on ci as well, there
is no reason for anyone to use node 0.10 during development.
2015-05-12 16:05:48 -07:00
Misko Hevery 555dd93ed9 chore: change gulp test.unit.js to use dots reporter 2015-05-12 12:59:53 -07:00
Victor Berchet c8a0ed40bd refactor(NgZone): use zone.js v0.5 from npm 2015-05-12 21:07:25 +02:00
Kevin Moore 98e7a38e50 chore: use SDK dartfmt 2015-05-12 09:56:38 -07:00
vsavkin 92d6aa1f32 fix(gulpfile): fixed test.unit.dart to format dart code before running test 2015-05-11 13:28:20 -07:00
vsavkin 3256ff1c73 feat(gulpfuile): added watch.js.dev 2015-05-11 13:28:19 -07:00
Igor Minar 1a4ab2c57a build(gulp): remove the check-format step from test.unit.js task 2015-05-11 12:08:27 -07:00
Igor Minar c82cc47767 build(gulp): watch and incrementally compile files for server.js.dev task
Closes #1770
2015-05-08 16:42:40 -07:00
Igor Minar 31cbec0857 build(gulp): check node and npm version and log a warning if incompatible
Closes #1758
2015-05-08 11:04:10 -07:00
Igor Minar 5e4fa5cf07 build(gulp): use gulp-watch instead of gulp.watch for watching files
gulp-watch uses chokidar which uses fsevents which is much better than fs polling or relying on fs.watch.

fsevents use only one FD per watch invocation as opposed to one FD per watched directory and any subdirectory.

this should improve the situation with EMFILE errors (caused by lack of available file descriptors)

----

I also tried the following:

gulp-sane: requires watchman installation via brew so I didn't want to request that everyone goes throught that yet
gulp-chokidar: didn't work, seems to be obsolete
2015-05-07 22:27:36 -07:00
Jeremy Elbourn 20a033e4c9 chore(material): add simple e2e smoke tests for components. 2015-05-07 15:13:30 -07:00
Alex Eagle 6bba289a3c fix(build): build the broccoli tools with correct typescript version.
By default, gulp-typescript currently depends on typescript 1.4, which doesn't work for us.
For example, it doesn't allow `let` when emitting ES5, along with lots of other errors.
It so happens that npm sometimes makes this work, as seen by the warning
```npm WARN unmet dependency /Users/alexeagle/Projects/angular/node_modules/gulp-typescript requires typescript@'1.4.1' but will load
npm WARN unmet dependency /Users/alexeagle/Projects/angular/node_modules/typescript,
npm WARN unmet dependency which is version 1.5.0```
but when we update our node_modules in a certain way, we lose this setup and it breaks.

We should be explicit about using a different version of typescript than gulp-typescript depends on.
2015-05-07 13:37:40 -07:00
Igor Minar 705d3aacff build(gulp): fix concurrency and caching issues in test.unit.js and test.unit.dart tasks
previously there was a chance of race conditions that could sporadically fail the build.

additionally runing a task via gulp.start or runSequence always reruns its dependencies, which meant that we were blowing away
the build.tools build and rebuilding everything from scratch even during the interactive/watch mode. This meant that the build
pipeline cache was destroyed on every change and we never got the benefit of incremental compilation
2015-05-06 08:46:03 -07:00
Igor Minar 1d0078415f build(broccoli): refactor typescript plugin to be incremental via DiffingBroccoliPlugin 2015-05-06 07:45:46 -07:00
Igor Minar 9d1df21d91 build(gulp): do no rebuild tools during test.unit.cjs
This introduces private !build.js.cjs task that is to be executed only from other public tasks.
2015-05-06 07:45:46 -07:00
Igor Minar 6b017fb388 build(gulp): create private build.tools task and use it instead of magic variable
This way when gulp prints out that it's running build/clean.tools it really means
that it's cleaning up the build directory.
2015-05-06 07:45:45 -07:00
Julie Ralph bb6f59e423 chore(build): make karma watch broccoli output for dart unit tests
Previously, karma used a custom preprocessor. Instead, have karma
run built dart from the `dist` folder and use gulp and broccoli
to watch for changes.
2015-05-05 19:24:20 -07:00
Rado Kirov 8e1d53b5e9 feat(router): adds the router to the self-executing bundle.
Due to limitation of system build, the router cannot have its own sfx
bundle.

Fixes an issue with RouteConfig decorator by moving it into its own
file.
2015-05-05 10:55:23 -07:00
Brian Ford 2f0fef8ee1 chore(router): add router bundle to gulpfile 2015-05-01 16:43:19 -07:00
Rado Kirov cf32213079 fix(bundle): update the bundle config to point to rx.js 2015-05-01 15:01:18 -07:00
Alex Eagle 3c77855b39 chore(build): Remove .es6 files which shadow .ts files.
This removes .es6 files which are pure duplicates of a
.ts file in the same folder.
Next we need to remove .js files as well, and remove karma preprocessors for dart.
2015-05-01 09:51:03 -07:00
Rado Kirov fb67e37339 feat(decorators): adds decorators to be used by TS and Babel transpiled apps. 2015-04-29 15:13:25 -07:00
Alex Eagle 511e832ee2 chore(build): Karma watches broccoli output.
This is a prerequisite for switching to TypeScript. We need to remove the Traceur preprocessor
from Karma, so we have the build specified in a single place (broccoli tree def'n).
2015-04-29 14:15:45 -07:00
Jeremy Elbourn b9eab463f7 chore(): fix host properties for MD components. 2015-04-28 10:48:03 -07:00
Alex Wolfe c269bd5d3c chore(doc-gen): generate docs for angular.io
You can generate docs for comsumption by the angular.io website by running:

```bash
gulp docs/angular.io
```

The generated docs can be found in `dist/angular.io`
2015-04-28 14:31:34 +01:00
Igor Minar 8ea03d0380 build(gulp): fix incremental compilation by reusing angularBuilder across watch re-reruns 2015-04-27 10:47:52 -07:00
Igor Minar d1ec2e18cd build(gulp): add test.unit.tools to test.js task 2015-04-27 10:47:52 -07:00
Igor Minar aa58e4bba5 build(gulp): add build/clean.tools task prevent test.unit.tools/ci from building
on our CI server we currently split each build into the building phase and testing phase, this change aligns test.unit.tools/ci
with the rest of ci test taskswq
2015-04-27 10:47:52 -07:00
Igor Minar 8a5cf896d0 build(gulp): remove obsolete config 2015-04-27 10:47:51 -07:00
Igor Minar 22c79df98d build(gulp): remove gulp-jasmine, run tests in a new process instead
otherwise we see occasional failures due to require.cache and other global state collisions
2015-04-27 10:47:51 -07:00
Igor Minar a52798543a build(gulp): rename tasks `build.broccoli.tools` => `build.tools` + `test.unit.broccoli` => `test.unit.tools` 2015-04-27 10:47:51 -07:00
Igor Minar 1cbdb9cd17 refactor(build): introduce AngularBuilder facade and clean up many things 2015-04-27 10:47:51 -07:00
Igor Minar 4c9b8ebb0c build(gulp): remove obsolete gulp transformer 2015-04-27 10:47:51 -07:00
Igor Minar 6aea629cd3 build(gulp): use strict mode for gulpfile
- a variable `public` was renamed since it is a reserved keyword in the strict mode
2015-04-27 10:47:51 -07:00
Igor Minar 649fd5a7a9 chore(build): exclude tree-differ.ts from format-checking due to a bug in clang-format
see https://github.com/angular/clang-format/issues/4
2015-04-27 10:47:50 -07:00
Igor Minar 40c4eb7240 build(gulp): refactor test.unit.broccoli to use task dependencies and not die when a compilation error occurs
With this change we also stop gulp task queue when an error in build.broccoli.tools occurs, that way we
don't bother testing when transpilation fails.
2015-04-27 10:47:50 -07:00
Igor Minar 42e7fc5252 build(broccoli): add source-maps to our broccoli tools 2015-04-27 10:47:50 -07:00
Igor Minar 32c5ab956c build(broccoli): add testing infrastructure for our build plugins
components:
- gulp test.unit.broccoli task
- mock-fs for mocking our FS in unit tests
- jasmine d.ts file for type checking

jasmine lib is provided by minijasmine2 so we don't need to include it explicitly
2015-04-27 10:47:49 -07:00
Igor Minar 725f909ff8 chore(build): refactor test.unit.cjs to use the broccoli pipeline
This change solves several problems:
- the broccoli pipeline is used to compile the node/cjs tree upon any change to the modules/ directory
- jasmine tests run in a new process removing the need to clean up environment after each test
- since we transpile only those test files that are actually needed for node/cjs build, we transpile less and don't need to filter out tests
2015-04-27 10:47:49 -07:00
Alex Eagle 623edcd2d8 Copy a second package to TypeScript. 2015-04-24 15:49:04 -07:00
Yegor Jbanov 87cf434929 chore(sources): intro modules_dart; move analyzer code there
We have Dart code in `angular2` module that ought to be in its own
package. Examples include Dart analysis plugins, and potentially the
transformers (although transformers cannot be moved out just yet).
However, this code is Dart-only and it doesn’t make sense to use JS
directory layout for it. This commit introduces a sub-directory called
`modules_dart`. All modules in this directory are pure Dart packages
using standard pub directory layout. The code in these packages never
gets transpiled. It is directly copied to `dist` unmodified, except an
adjustment in relative paths in `pubspec.yaml` files.
2015-04-24 13:29:18 -07:00
Marc Laval 22c6c09daf chore(build): run event tests in Node
Closes #1476
2015-04-21 16:21:39 -07:00
Marc Laval aabe83cf63 chore(build): run application tests in Node
Closes #1423
2015-04-20 14:45:18 +02:00
Tim Blasi 00e2d70f05 refactor(dart/transform): Remove index_static from hello_world
index_static.js & index_static.html are unnecessary in Js and are now
essentially generated via the Dart transformer. The angular
transformer is specified in examples/pubspec.yaml; use pub build to
create a transformed application that does not use dart:mirrors.

Create index_dynamic.js & index_dynamic.html, which are used to test
that the app runs equally well with mirrors and without.

Closes #495
2015-04-17 16:11:48 -07:00
Misko Hevery 87ac100c66 docs: add DI to public docs 2015-04-17 03:56:17 +00:00
Marc Laval d3e391d176 chore(build): run render tests in Node
Closes #1358
2015-04-15 19:51:11 -07:00
Tobias Bosch e14543498c fix(build): remove import of gulp-traceur which pulls in a different version of traceur
This lead to build fails.
2015-04-15 11:17:42 -07:00
Jeremy Elbourn f149ae79c6 feat(material): first ng2 material design components 2015-04-14 16:15:35 -07:00
Martin Probst aba61f22a6 chore(build): Remove even more obsolete build config values. 2015-04-14 13:38:41 -07:00
Martin Probst 2d09f84182 fix(build): Fail the build for certain TS errors. 2015-04-14 11:54:36 -07:00
Martin Probst ef6e0d8eb8 chore(build): remove obsolete html.js, copy.js, srcFolderInsertion. 2015-04-14 11:54:36 -07:00
Martin Probst db97d73c3b feat(build): Move HTML copying into the broccoli task.
This includes all tasks to construct a Dart tree, except for formatting, and
reverse engineers/refactors the various copy tools for added more sanity.
2015-04-14 11:54:31 -07:00
Rado Kirov 3177576ad6 feat(bundle): adds a self-executing dev bundle (SFX). 2015-04-13 18:05:53 -07:00
Alex Eagle 896a0457f8 refactor(build): Better encapsulate the broccoli builder. 2015-04-13 17:28:00 -07:00
Igor Minar caf8e2723d chore(build): remove obsolte gulp tasks 2015-04-13 16:52:08 -07:00
Igor Minar 0107543a33 chore(build): move build/transformCJSTests task to broccoli 2015-04-13 16:52:08 -07:00
Yegor Jbanov 6c8398df9b fix(di): refactor bindings to support Dart annotations 2015-04-13 15:06:43 -07:00
Marc Laval ff6e7754ae chore(build): gulp test.unit.cjs broken the second run
Fixes #1311

Closes #1333
2015-04-13 21:44:54 +00:00
Alex Eagle 34501aaae6 chore(build): move more broccoli support inside the TypeScript boundary 2015-04-13 12:24:28 -07:00
Igor Minar 3dd0ac1f0a chore(build): move dart broccoli tree to make-broccoli-tree 2015-04-13 11:20:59 -07:00
Igor Minar 1f6c6dbf2f chore(build): refactor broccoli trees to generate them in order to reduce duplication 2015-04-13 10:07:31 -07:00
Alex Eagle daf0f472b3 feat(build): enforce formatting of some files.
Our style guide includes formatting conventions. Instead of wasting time in reviewing PRs discussing things like indenting, and to avoid later deltas to fix bad formatting in earlier commits, we want to enforce these in the build.
The intent in this change is to fail the build as quickly as possible in travis, so those sending a PR immediately know they should run clang-format and update their commit. When running locally, we want users to know about formatting, but they may not want to act on it immediately, until they are done working. For this reason, it is only a warning outside of the continuous build.
This is done by having a check-format task which should run on most local builds, and an enforce-format task only run by travis.
2015-04-11 18:39:28 -07:00
Martin Probst a3decad4c2 feat(build): Use broccoli for ts2dart transpilation. 2015-04-11 16:26:44 -07:00
Alex Eagle 2ed7622239 chore(build): compile the .ts broccoli tools.
This avoids having to check in the compiled .js files.
2015-04-10 17:29:32 -07:00
Alex Eagle f0477e164a chore(build): add typescript to the cjs build.
Refactor the file extension logic in traceur plugin to simplify
2015-04-10 15:22:03 -07:00
Tim Blasi 82127571b5 feat(dart/transform): Use the Dart transformer for benchmarks
Remove explicit generation of reflection information in benchmark code
and generate it with the transformer.
2015-04-10 14:01:55 -07:00
Igor Minar ea58ef85fc chore(build): move the js.prod build over to broccoli 2015-04-10 13:11:58 -07:00
Alex Eagle 564477b8a0 chore(build): migrate build.js.cjs to broccoli.
This doesn't do the typescript part of the build yet. Also there is a bit
of hackiness left to resolve in a follow-up change.
2015-04-10 11:39:48 -07:00
Martin Probst 8c3007e4b5 fix(build): Remove unused `done` function arguments.
gulp only requires receiving a done argument if a task is not returning
a stream. Doing both is unnecessary and confusing.
2015-04-09 18:03:27 -07:00
Martin Probst 226cbc7db3 feat(dart): Use ts2dart for transpilation.
This switches all transpilation over from using Traceur to using ts2dart, based
on the TypeScript tool chain. Transpilation is a bit slow due to issues with
the gulp integration, but that should be easily fixable once we move to
broccoli.
2015-04-09 18:03:27 -07:00
Martin Probst cc7c7b3321 fix(build): Don't include rtts in the dart build.
The module name actually does not include a trailing slash, so the
folder would show up and be included in the dart pubbuild.
2015-04-09 18:03:26 -07:00
Alex Eagle b94b04c074 chore(build): Migrate remaining tasks under build.js.dev to broccoli. 2015-04-09 14:09:38 -07:00
Alex Eagle a3097aaf05 chore(build): Migrate build.js.dev fully to broccoli.
The previous change did the ES6 transpile, now we add ES5.
The sourcemaps are broken, but were also broken previously. We'll address that separately.
2015-04-09 11:00:47 -07:00
Alex Eagle de581ea8b3 chore(build): Move broccoli support to own module.
Add support for multiple pipelines in different Brocfile's.
2015-04-08 10:41:42 -07:00
Rado Kirov c349eb4fa4 fix(bundles): remove work-around rx.js module detection.
Updates rx to the newest version, because a fix is needed.

Closes #1245
2015-04-08 11:01:01 +02:00
Alex Eagle d6003ee0ab chore(build): Add traceur transpiler for broccoli.
This exactly reproduces the output tree from one of the gulp tasks, which is now removed.
Next step is to migrate another sibling task to broccoli.
2015-04-07 16:38:02 -07:00
Tim Blasi 42c0171b40 chore(dart/transform): Create targets for serving transformed Dart code
- Allow pub (build|serve) to specify mode
- Update pubbuild.js & pubserve.js to allow the caller to provide a `mode` value.
- Update settings to allow the di benchmark to be transformed to run statically.
2015-04-07 10:57:01 -07:00
Alex Eagle 894a0f0ee5 chore(ts): duplicate the .es6 files in the facade directory to TypeScript.
Adds a gulp task which builds the .ts files (in the cjs build only).
The new files have extension .ts since they are now valid typescript.
Unfortunately until Typescript can emit System.require, we have to keep the old .es6 version
so traceur works inside the Karma preprocessor. This should be fixed soon.
2015-04-03 09:35:06 -07:00
Rado Kirov bcbed2812d feat(bundle): work-around rx.all.js bundle issue.
Adds long-stack-trace-zone into the dev build. Turn off source maps
until proper concatination of them is added.
2015-04-02 19:54:07 -07:00
Rob Wormald c0b04ca0bc feat(gulp): adds System.register bundle task. 2015-04-02 19:54:06 -07:00
Victor Berchet a96c149793 chore(gulp): Stop copying .cjs files to the dist folder
They're already transpiled by the build/transpile.js.cjs task
2015-04-02 20:51:16 +02:00
Jeff Cross 814d389b6e chore(gulp): add typescript transpilation tasks 2015-04-01 15:01:27 -07:00
Tobias Bosch c63b3164bd fix(build): add package.json again to the copy files for js 2015-03-27 17:34:26 -07:00
Tobias Bosch 8c5d9d372f fix(build): publish docs as well and correct bench press docs 2015-03-27 16:47:52 -07:00
Alex Eagle dd235f38a3 fix(build): try to eliminate build flakes by running dartstyle:format sequentially 2015-03-26 16:23:09 -07:00
Martin Probst 18ff2be9bb feat(ts2dart): include srcFolderInsertion in ts2dart step. 2015-03-25 21:31:40 -07:00
Alex Eagle c0d296334c feature(ts2dart): ts2dart runs on all .js files.
Update the experimental ts2dart task to also read the .es6 files, which are the next step.
2015-03-25 17:14:06 -07:00
vsavkin 9b3b3d325f feat(facade): added support for observables 2015-03-24 13:45:39 -07:00
Alex Eagle 43f4374944 feature(build): Include ts2dart transpile step in the Angular build.
This only transpiles one package to start with: di/
It ensures that package transpiles without errors, so no one can
introduce non-TypeScript syntax.
Next step is to widen the task inputs to cover additional packages.

See design doc for the migration:
https://docs.google.com/document/d/14RJLhu6uuv7NchFkAb6PKzOOO0L7l3Z507eKWzkEUhQ/edit

A convenience task 'ts2dart' is added for developing ts2dart, and
it runs all of the angular code through the transpiler to collect errors.
2015-03-24 10:34:46 -07:00
Patrice Chalin 83402930f2 chore(install+test): single cmd to full install/test & test JS w/o Dart
* `npm install` now does a full install; auxiliary installation steps
have been integrated into the `postinstall` script.
* Updated developer docs `DEVELOPER.md` accordingly; also added
instructions to dev docs for performing full tests (via `npm test`) --
same as those run on Travis.
* Reorg in tests so that JS tests can run without a Dart env.

Partly fixes #945 **under the assumption that when running JS tests
locally, `ChromeCanary` is the desired browser to use**. Note that CI
tests (Travis) still uses `DartiumWithWebPlatform` across the board
(Maybe because ChromeCanary isn't being installed?)

Fixes #1012.

Closes #1010
2015-03-21 14:55:11 -07:00
Marc Laval 52bf0def4e chore(test): improve test.unit.cjs task
Closes #998
2015-03-18 21:51:57 -07:00
Marc Laval a46af9c41c feat(build): check circular depencies in Node.js
Closes #980
2015-03-17 22:12:26 -07:00
Marc Laval 46b03a524e feat(test): more tests in Node.js 2015-03-17 16:58:58 -07:00
Peter Bacon Darwin 8229d7edc2 chore(gulpfile): duplicate tasks to generate "public" docs 2015-03-17 14:44:45 -07:00
Jacob MacDonald a963ae48e5 feat(benchmarks): add polymer js 0.8-preview benchmark
Limitations because of preview status (see #960):

- does not yet use ShadowDOM
- does not use a builtin conditional like `if`
- uses a temporary bower repository

Closes #943
2015-03-13 20:48:03 -07:00
gil 3974e382f9 chore(gulp): fix typo HTLM to HTML in a variable name
Closes #920
2015-03-13 21:52:14 +01:00
Marc Laval e8965656a4 feat(directives/forms): run tests in NodeJS
Closes #921
2015-03-13 19:18:15 +01:00
Marc Laval 1d4ff9bcdc feat(compiler): parse5 DOM adapter
Closes #841
2015-03-11 14:42:54 +01:00
Cory Bateman 04abf2629b chore(gulpfile.js): minor corrections
Removed unnecessary comma and semicolon

Closes #863
2015-03-03 08:53:53 -07:00
Tobias Bosch 9c9769e3dd fix(build): copy files that are included in html files to the same folder
This is e.g. needed to allow Dart benchmarks to be served via `pub`
2015-03-02 16:34:32 -08:00
Tobias Bosch 81a5ae8f6e fix(build): report and fail on errors
tree benchmark was broken and we didn’t know it…

also changes reporting to not include messages from `console.time()`, …
2015-03-02 16:34:32 -08:00
Yegor Jbanov 757eae8ad3 feat(compiler): DOM adapters + html5lib implementation; misc fixes 2015-02-27 16:49:14 -08:00
Tobias Bosch e3f4c60f46 feat(build): copy css files 2015-02-26 10:54:19 -08:00
Tobias Bosch 3f25f5a356 feat(build): add general copy/multicopy method 2015-02-24 16:53:44 -08:00
Yegor Jbanov d1f03e509b fix(benchpress): benchpress fixes and a smoke test for Dart 2015-02-23 10:50:51 -08:00
Kevin Moore 895b2a7bdf Format Dart code right after transform
Much easier to diagnose errors with pub build, analyzer, etc with formatted code

Closes #742
2015-02-21 18:20:05 +00:00
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
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