diff --git a/gulpfile.js b/gulpfile.js index 459bf680a7..a17dbd41c3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -23,11 +23,14 @@ var traceur = require('gulp-traceur'); var wrap = require('gulp-wrap'); var argv = require('yargs').argv; -gulp.task('default', ['sass', 'examples', 'ng2']); +gulp.task('default', ['sass', 'e2e', 'ng2']); gulp.task('watch', ['default'], function() { gulp.watch(buildConfig.src.scss, ['sass']); - return gulp.watch(buildConfig.src.examples.concat('scripts/examples/index.template.html'), ['examples']); + gulp.watch([].concat( + buildConfig.src.js, buildConfig.src.e2e, buildConfig.src.html, + 'scripts/e2e/index.template.html' + ), ['e2e']); }); gulp.task('karma', function() { @@ -54,7 +57,7 @@ gulp.task('clean', function(done) { gulp.task('e2e', function() { var e2eSrc = path.join(__dirname, 'src/components/**/test/**/*'); - var templateSrc = path.join(__dirname, 'scripts/examples/index.template.html'); + var templateSrc = path.join(__dirname, 'scripts/e2e/index.template.html'); var e2eDest = path.join(__dirname, 'dist/e2e/'); return gulp.src(e2eSrc) @@ -67,14 +70,6 @@ gulp.task('e2e', function() { .pipe(gulpif({ isFile: true }, gulp.dest(e2eDest))); }); -gulp.task('e2e-watch', ['e2e'], function() { - gulp.watch(buildConfig.src.scss, ['sass']); - return gulp.watch([ - 'src/components/**/test/**/*', - buildConfig.src.examples.concat('scripts/examples/index.template.html') - ], ['e2e']); -}); - require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig); // Take es6 files from angular2's output, rename to js, and move to dist/lib/ diff --git a/scripts/build/config.js b/scripts/build/config.js index 3cfb2474bd..ed486ddfc1 100644 --- a/scripts/build/config.js +++ b/scripts/build/config.js @@ -1,8 +1,9 @@ module.exports = { dist: 'dist', src: { - test: ['src/**/*.spec.js'], - examples: ['src/**/examples/**'], + test: ['src/**/test/*.spec.js'], + js: ['src/**/*.js', '!src/**/test/**/*'], + e2e: ['src/**/test/*/**/*'], html: 'src/**/*.html', scss: 'src/components/**/*.scss', }, diff --git a/scripts/examples/index.template.html b/scripts/e2e/index.template.html similarity index 100% rename from scripts/examples/index.template.html rename to scripts/e2e/index.template.html diff --git a/src/components/aside/aside.js b/src/components/aside/aside.js index fd636517f4..c7c3710b63 100644 --- a/src/components/aside/aside.js +++ b/src/components/aside/aside.js @@ -4,21 +4,6 @@ import {Config} from '../../core/config/config'; import {SlideEdgeGesture} from '../../core/gestures/slide-edge-gesture'; import * as util from '../../util'; -export var asideConfig = new Config('aside'); - -// TODO defaults or bindings? -asideConfig.set({ - side: 'left', - dragThreshold: 50 -}) - - -class AndroidAside {} -class IosAside {} - -asideConfig.platform('android').component(AndroidAside); -asideConfig.platform('ios').component(IosAside); - // AsideParent is just a temporary directive @Component({ selector: 'ion-aside-parent' @@ -56,9 +41,6 @@ export class Aside { // TODO: remove this. setTimeout has to be done so the bindings can be applied setTimeout(() => { - let Comp = asideConfig.invoke(this); - console.log('using', Comp); - let GestureConstructor = { left: LeftAsideSlideGesture, top: TopAsideSlideGesture, diff --git a/src/core/history/history.js b/src/core/history/history.js deleted file mode 100644 index 50487afed5..0000000000 --- a/src/core/history/history.js +++ /dev/null @@ -1,34 +0,0 @@ - -export class History { - constructor() { - this._array = []; - } - - indexOf(item) { - return this._array.indexOf(item); - } - - push(item) { - return this._array.push(item); - } - - pop() { - return this._array.pop(); - } - popTo(index) { - var item = this._array[index]; - if (index !== -1) { - this._array.length = index + 1; - } - return item; - } - - peek(index) { - if (!arguments.length) index = this._array.length - 1; - return this._array[this._array.length - 1]; - } - - length() { - return this._array.length; - } -}