Skip to content

Commit

Permalink
feat(mock): add mock module and bundle
Browse files Browse the repository at this point in the history
Closes #2325
  • Loading branch information
btford committed Jun 22, 2015
1 parent e5de1f7 commit 2932377
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 14 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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']);

Expand Down
5 changes: 5 additions & 0 deletions modules/angular2/mock.ts
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit 2932377

Please sign in to comment.