diff --git a/gulpfile.js b/gulpfile.js index 09f65c987..4a91cb9ea 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -104,15 +104,30 @@ gulp.task('build/zone.js', ['compile-esm'], function(cb) { return generateScript('./lib/browser/rollup-main.ts', 'zone.js', false, cb); }); +gulp.task('build/zone.min.js', ['compile-esm'], function(cb) { + return generateScript('./lib/browser/rollup-main.ts', 'zone.min.js', true, cb); +}); + +// Zone test bundle for the browser. +gulp.task('build/zone-testing-bundle.js', ['compile-esm'], function(cb) { + return generateScript('./lib/browser/rollup-test-main.ts', 'zone-testing-bundle.js', false, cb); +}); + +// Zone test bundle for node. +gulp.task('build/zone-testing-node-bundle.js', ['compile-esm'], function(cb) { + return generateScript('./lib/node/rollup-test-main.ts', 'zone-testing-node-bundle.js', false, cb); +}); + +// Zone test related files for the browser. +gulp.task('build/zone-testing.js', ['compile-esm'], function(cb) { + return generateScript('./lib/testing/zone-testing.ts', 'zone-testing.js', false, cb); +}); + // Zone for electron/nw environment. gulp.task('build/zone-mix.js', ['compile-esm-node'], function(cb) { return generateScript('./lib/mix/rollup-mix.ts', 'zone-mix.js', false, cb); }); -gulp.task('build/zone.min.js', ['compile-esm'], function(cb) { - return generateScript('./lib/browser/rollup-main.ts', 'zone.min.js', true, cb); -}); - gulp.task('build/zone-error.js', ['compile-esm'], function(cb) { return generateScript('./lib/common/error-rewrite.ts', 'zone-error.js', false, cb); }); @@ -246,6 +261,9 @@ gulp.task('build', [ 'build/zone.js', 'build/zone.js.d.ts', 'build/zone.min.js', + 'build/zone-testing.js', + 'build/zone-testing-bundle.js', + 'build/zone-testing-node-bundle.js', 'build/zone-error.js', 'build/zone-error.min.js', 'build/zone-node.js', diff --git a/lib/browser/rollup-test-main.ts b/lib/browser/rollup-test-main.ts new file mode 100644 index 000000000..91a951b24 --- /dev/null +++ b/lib/browser/rollup-test-main.ts @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import './rollup-main'; + +// load test related files into bundle +import '../testing/zone-testing'; diff --git a/lib/node/rollup-test-main.ts b/lib/node/rollup-test-main.ts new file mode 100644 index 000000000..91a951b24 --- /dev/null +++ b/lib/node/rollup-test-main.ts @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import './rollup-main'; + +// load test related files into bundle +import '../testing/zone-testing'; diff --git a/lib/testing/zone-testing.ts b/lib/testing/zone-testing.ts new file mode 100644 index 000000000..3f0984fce --- /dev/null +++ b/lib/testing/zone-testing.ts @@ -0,0 +1,15 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// load test related files into bundle in correct order +import '../zone-spec/long-stack-trace'; +import '../zone-spec/proxy'; +import '../zone-spec/sync-test'; +import '../jasmine/jasmine'; +import '../zone-spec/async-test'; +import '../zone-spec/fake-async-test'; \ No newline at end of file