Commit Graph

292 Commits

Author SHA1 Message Date
Matias Niemelä cd6175827f refactor: use a custom replacement build step instead of broccoli-replace 2015-06-08 16:28:19 -07:00
Matias Niemelä 72736a1b09 revert: refactor: use a custom replacement build step instead of broccoli-replace
This reverts commit d5c528ac2b.
2015-06-06 00:58:57 -07:00
Matias Niemelä d5c528ac2b refactor: use a custom replacement build step instead of broccoli-replace
Closes #2050
2015-06-05 16:16:09 -07:00
Caitlin Potter 5357b1548a chore(broccoli): disable logging in DiffingBroccoliPlugin
It is very noisy, especially when multiple trees are used. Since the
tree differ is fairly quick, it's not measuring the real costs of a
plugin anyhow.

Closes #2378
2015-06-05 17:49:25 -04:00
Caitlin Potter 928ec1c5f8 fix(broccoli): ensure that inputTrees are stable 2015-06-05 16:48:54 -04:00
Caitlin Potter dc8dac7c35 feat(broccoli): improve merge-trees plugin and add "overwrite" option 2015-06-05 16:48:54 -04:00
Caitlin Potter 4ee3fdaf7f feat(broccoli): add diffing MergeTrees plugin
Closes #1815
Closes #2064
2015-06-05 16:48:46 -04:00
Caitlin Potter 41ae8e76f0 feat(diffing-broccoli-plugin): support multiple inputTrees
Closes #1815
Closes #2064
2015-06-05 16:48:32 -04:00
Martin Probst 471a1b6d12 fix: format a file that slipped in. 2015-06-03 15:50:45 -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 31b6687894 fix(build): make dart formatter errors more readable
Truncates the output to just the interesting parts
2015-06-03 14:42:24 -07:00
Brian Ford 381d4cb30a fix(gulp): prevent duplicate error messages
Closes #2021
2015-06-03 14:42:24 -07:00
vsavkin cd52d8a3be fix(forms): disabled form tests on cjs until fakeAsync is fixed 2015-05-30 11:56:38 -07:00
Caitlin Potter e5d06e479a feat(broccoli): add incremental dartfmt plugin
Closes #2211
2015-05-29 18:55:37 -04:00
Brian Ford 05d66bba3f fix(test): clang formatting errors 2015-05-28 13:30:45 -07:00
Igor Minar b14417498a build(broccoli): reorder tree-differ specs 2015-05-28 11:44:37 -07:00
Igor Minar 05becf8431 style(build): reorder imports 2015-05-28 11:44:37 -07:00
Igor Minar 160c38b5ca build(broccoli): improve error messaging from TreeDiffer 2015-05-28 11:44:37 -07:00
Igor Minar 9b0fa0dedc build(broccoli): TreeDiffer should log associated plugin name rather than inputPath
Usually we don't care what we are diffing, but why we are diffing it. With this change we see what is causing build slowdown
due to diffing.
2015-05-28 11:44:37 -07:00
Igor Minar c1157d62a8 build(broccoli): update broccoli.d.ts docs 2015-05-28 11:44:37 -07:00
Igor Minar 7b1e9286d8 build(broccoli): add tree-stabilizer plugin to deal with unstable trees
Previously we assumed that all input and ouput paths for broccoli trees are immutable, that turned out to be
incorrect.

By adding a tree stabilizer plugin in front of each diffing plugin, we ensure that the input trees
are stable. The stabilization is done via symlinks which is super cheap on platforms that support
symlinks. On Windows we currently copy the whole input directory, which is far from ideal. We should
investagate if using move operation on Windows is ok in the future to improve performance.

Closes #2051
2015-05-28 11:44:36 -07:00
Jeff Cross 9d90128463 refactor(ChangeDetection): convert change detection tests to typescript 2015-05-28 10:01:30 -07:00
Ian Riley ebe1e73b1a refactor (test/test_lib): Ts'ifying test/test_lib
Translates AtScript files in test/test_lib to TypeScript.

Closes #2183
2015-05-28 09:50:59 -07:00
Ian Riley 8ce0a67c81 refactor (test/services): Ts'ifying test/services
Translates AtScript files in test/services to TypeScript

Closes #2193
2015-05-28 09:48:38 -07:00
Martin Probst 2c25055828 chore: reformat the code base using the clang-format 1.0.15. 2015-05-27 15:28:22 -07:00
Tobias Bosch 05774f6c8a fix(build): also run ts tests in node. 2015-05-22 13:19:58 -07:00
Igor Minar 4210b0e66a build(broccoli-typescript): refactor output removal
this is just to make the code a bit more easier to follow
2015-05-20 11:30:45 -07:00
Igor Minar 2d6c44b54a build(broccoli-typescript): do full rebuild after we recover from incremental failures
this is to ensure that we are not reporting success if unchanged files still contain errors.
2015-05-20 11:30:44 -07:00
Victor Berchet 91ccc9af98 fix(XHRImpl): fix errors, add a spec
fixes #1715
2015-05-20 08:31:50 +02:00
Igor Minar c54f5e0ba2 build(broccoli-typescript): do a global emit during the first run
reduces the time spent in TSC for the initial build to 1 sec (down from 23sec).
2015-05-19 17:41:50 -07:00
Igor Minar 37a8f1037e build(broccoli-typescript): add missing semicolon 2015-05-19 17:41:50 -07:00
Igor Minar 4ba81bf3eb build(node_tree): fix broken test.unit.cjs task which breaks on rebuild 2015-05-19 17:40:50 -07:00
Igor Minar c204835969 style(nodeTree): fix formatting
the formatting was messed up due to https://github.com/angular/clang-format/issues/7.

I replaced the fat arrow function with regular function expression to resolve the formatting issue
2015-05-19 17:39:57 -07:00
Tobias Bosch 8aa3fcfb63 chore(build): don’t include `export var __esModule = true` in every file
But do it during the build process for cjs.
Right now we only need this when we transpile from ts
directly to es5. This is only the case in our
cis build, as for our browser build we only transpile
from ts to es6 via ts and then use traceur to do
the rest.
2015-05-19 15:12:59 -07:00
Tobias Bosch 1beadb8607 refactor(render): ts’ify render api 2015-05-19 15:12:59 -07:00
Victor Berchet 0f002a5b18 feat(fakeAsync): allow simulating the passage of time 2015-05-19 06:51:15 +02:00
Caitlin Potter aad5795408 fix(tree-differ): treat symlinks to deleted paths as removals
Previously, tree-differ would not correctly handle symlinks to deleted files, resulting in
an ENOENT errno being tossed by libuv.

This change fixes this to ensure that symlinks are safely handled, performantly.

Closes #1961
2015-05-18 20:36:29 -04:00
Marc Laval c397297eef chore(build): fix build.js and test.unit.cjs on Windows
Closes #1873
2015-05-16 22:44:11 +02:00
Igor Minar 666336be1a build(trees): remove unused imports 2015-05-14 10:01:37 -07:00
Caitlin Potter 3969009fe7 build(brocolli): convert brocolli-ts2dart to use TreeDiffer
Closes #1720
Closes #1733
2015-05-13 21:04:51 -04:00
Victor Berchet c8a0ed40bd refactor(NgZone): use zone.js v0.5 from npm 2015-05-12 21:07:25 +02:00
Victor Berchet e11c20541a refactor(VmTurnZone): renamed to NgZone
BREAKING CHANGE:

VmTurnZone has been renamed to NgZone.

- The public API has not chnanged,
- The "outer" zone is now named "mount" zone (private to NgZone).
2015-05-12 21:03:24 +02:00
Victor Berchet fd1d60f03b refactor(VmTurnZone): use the browser microtask queue for JS 2015-05-12 21:03:24 +02:00
Victor Berchet e8a6c95e2a feat(VmTurnZone): Rework the implementation to minimize change detection runs
Before this PR there were only 2 zones: root zone = outer zone > inner
zone.
This PR creates the outer zone as a fork of the root zone: root > outer
> inner.

By doing this it is possible to detected microtasks scheduling in the
outer zone and run the change detection less often (no more than one
time per VM turn).

The PR also introduce a Promise monkey patch for the JS implementation.
It makes Promises aware of microtasks and again allow running the change
detection only once per turn.
2015-05-12 21:03:24 +02:00
Tim Blasi 4320859e1b chore(dart): Copy css resources in build
Include css resources in the files copied to the dist/dart directory.
This fixes 404s occuring when testing the todo/ app.
2015-05-12 10:02:00 -07:00
Tim Blasi 44f829dbc6 feat(dart/transform): Use the render Compiler and the DirectiveParser
Update the `TemplateCompile` step to use the full render `Compiler`.

Provide `DirectiveMetadata` for `ViewDefinition` objects and use it to
run the `DirectiveParser` step of the render compile pipeline.
2015-05-08 11:18:40 -07:00
vsavkin fa28b28d0a build(typescript): Migrated change detection to typescript 2015-05-07 17:18:04 -07:00
Caitlin Potter a58c9f83bd fix(brocolli): escape special regexp characters when building regexps
Special regexp tokens were allowed unchanged previously, which incorrectly broke
the include/exclude behaviour. Now, they're escaped first.

Closes #1721
Closes #1752
2015-05-07 19:01:12 -04:00
Alex Eagle 1daa8aa3a1 chore(shrinkwrap): update dependencies to latest
Also, our package.json was out-of-sync with npm-shrinkwrap.json; see https://github.com/angular/angular/issues/1737
This includes a fix for the shrinkwrapping of ts2dart; see https://github.com/angular/ts2dart/issues/138
2015-05-07 14:29:43 -07:00
Caitlin Potter aaf3edd131 build(brocolli): move filename filtering into DiffingPluginWrapper
Closes #1719
2015-05-07 17:00:35 -04:00
Igor Minar 1d0078415f build(broccoli): refactor typescript plugin to be incremental via DiffingBroccoliPlugin 2015-05-06 07:45:46 -07:00
Igor Minar 3f36a3c119 build(broccoli): traceur plugin should react only to .js/.es6/.cjs file removal 2015-05-06 07:45:46 -07:00
Igor Minar 8c15ccecd1 build(broccoli): add DiffingBroccoliPlugin and refactor existing plugins to use it
tree-differ:
 - export both TreeDiffer and DiffResult  interface

 diffing-broccoli-plugin:
 - factory class for wrapping DiffingBroccoliPlugins and turning them into BroccoliTrees

 broccoli-dest-copy:
 - refactor into DiffingBroccoliPlugin

 broccoli-traceur:
 - refactor into DiffingBroccoliPlugin
2015-05-06 07:45:45 -07:00
Igor Minar e966869744 build(broccoli.d.ts): add tree.description signature 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
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
vsavkin e4342743c0 feat(benchmark): added an implementation of the tree benchmark in React 2015-04-30 18:12:21 -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
Marc Laval a51a5c2968 chore(build): run forms tests in Node
Closes #1565
2015-04-29 13:58:07 +02:00
Igor Minar 2827ca1559 build(broccoli): add a tree-differ workaround to browser trees 2015-04-27 10:50:59 -07: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 0a97f0b645 build(js.cjs): re-enable tests that now pass in cjs
previously these tests were failing but now they pass on master
2015-04-27 10:47:52 -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 7740fc071c build(broccoli): convert traceur and broccoli-dest-copy plugins to use tree-differ
Also adding symlink-or-copy to our npm dependencies since our plugins now use it.
2015-04-27 10:47:50 -07:00
Igor Minar bdf6af9bd6 build(broccoli): add custom broccoli.d.ts file 2015-04-27 10:47:50 -07:00
Igor Minar 2f83efaac8 build(broccoli): add tree-differ for diffing broccoli trees 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
Jeremy Elbourn f149ae79c6 feat(material): first ng2 material design components 2015-04-14 16:15:35 -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
Alex Eagle 896a0457f8 refactor(build): Better encapsulate the broccoli builder. 2015-04-13 17:28:00 -07:00
Igor Minar 0107543a33 chore(build): move build/transformCJSTests task to broccoli 2015-04-13 16:52:08 -07:00
Alex Eagle 70433e6b73 chore(build): use a Filter plugin to write the dest folder.
This lets broccoli keep the dest folder up-to-date in 'watch' mode,
so we should be able to use that for Karma.
2015-04-13 15:51:33 -07:00
Alex Eagle 34501aaae6 chore(build): move more broccoli support inside the TypeScript boundary 2015-04-13 12:24:28 -07:00
Igor Minar dbfc4c1c16 chore(build): inline Traceur options just like we do everywhere 2015-04-13 11:37:18 -07:00
Igor Minar 301863b105 chore(build): transpile only e2e test code into cjs 2015-04-13 11:31:14 -07:00
Igor Minar ef8dc40492 chore(build): correct comment 2015-04-13 11:31:14 -07:00
Igor Minar 6dbd4d969b chore(build): create es5build.js only for files that will become es6 npm packages 2015-04-13 11:31:14 -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
Martin Probst 4e2316c742 feat(build): Add rudimentary TS typings for broccoli. 2015-04-10 16:37:24 -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
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
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
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