diff --git a/gulpfile.js b/gulpfile.js index 872fafcfaa..ceeab61a25 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -787,6 +787,19 @@ gulp.task('router.bundle.js.dev', ['build.js.dev'], function() { { sourceMaps: true }); }); +gulp.task('mock.bundle.js.dev', ['build.js.dev'], function() { + var devBundleConfig = merge(true, bundleConfig); + devBundleConfig.paths = + merge(true, devBundleConfig.paths, { + "*": "dist/js/dev/es6/*.js" + }); + return bundler.bundle( + devBundleConfig, + 'angular2/mock - angular2/angular2', + './dist/bundle/mock.dev.js', + { sourceMaps: true }); +}); + // self-executing development build // This bundle executes its main module - angular2_sfx, when loaded, without // a corresponding System.import call. It is aimed at ES5 developers that do not @@ -842,7 +855,7 @@ gulp.task('bundle.js.sfx.dev.deps', ['bundle.js.sfx.dev'], function() { .pipe(gulp.dest('dist/bundle')); }); -gulp.task('bundle.js.deps', ['bundle.js.prod.deps', 'bundle.js.dev.deps', 'bundle.js.min.deps', 'bundle.js.sfx.dev.deps', 'router.bundle.js.dev']); +gulp.task('bundle.js.deps', ['bundle.js.prod.deps', 'bundle.js.dev.deps', 'bundle.js.min.deps', 'bundle.js.sfx.dev.deps', 'router.bundle.js.dev', 'mock.bundle.js.dev']); gulp.task('build.js', ['build.js.dev', 'build.js.prod', 'build.js.cjs', 'bundle.js.deps']); diff --git a/modules/angular2/mock.ts b/modules/angular2/mock.ts new file mode 100644 index 0000000000..bfad95eefd --- /dev/null +++ b/modules/angular2/mock.ts @@ -0,0 +1,5 @@ +export * from './src/mock/mock_location_strategy'; +export {LocationStrategy} from './src/router/location_strategy'; + +export {MockTemplateResolver} from 'angular2/src/mock/template_resolver_mock'; +export {MockXHR} from 'angular2/src/render/xhr_mock';