mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
no more examples anywhere
This commit is contained in:
17
gulpfile.js
17
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/
|
||||
|
@ -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',
|
||||
},
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user