mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +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 wrap = require('gulp-wrap');
|
||||||
var argv = require('yargs').argv;
|
var argv = require('yargs').argv;
|
||||||
|
|
||||||
gulp.task('default', ['sass', 'examples', 'ng2']);
|
gulp.task('default', ['sass', 'e2e', 'ng2']);
|
||||||
|
|
||||||
gulp.task('watch', ['default'], function() {
|
gulp.task('watch', ['default'], function() {
|
||||||
gulp.watch(buildConfig.src.scss, ['sass']);
|
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() {
|
gulp.task('karma', function() {
|
||||||
@ -54,7 +57,7 @@ gulp.task('clean', function(done) {
|
|||||||
|
|
||||||
gulp.task('e2e', function() {
|
gulp.task('e2e', function() {
|
||||||
var e2eSrc = path.join(__dirname, 'src/components/**/test/**/*');
|
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/');
|
var e2eDest = path.join(__dirname, 'dist/e2e/');
|
||||||
|
|
||||||
return gulp.src(e2eSrc)
|
return gulp.src(e2eSrc)
|
||||||
@ -67,14 +70,6 @@ gulp.task('e2e', function() {
|
|||||||
.pipe(gulpif({ isFile: true }, gulp.dest(e2eDest)));
|
.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);
|
require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig);
|
||||||
|
|
||||||
// Take es6 files from angular2's output, rename to js, and move to dist/lib/
|
// Take es6 files from angular2's output, rename to js, and move to dist/lib/
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
dist: 'dist',
|
dist: 'dist',
|
||||||
src: {
|
src: {
|
||||||
test: ['src/**/*.spec.js'],
|
test: ['src/**/test/*.spec.js'],
|
||||||
examples: ['src/**/examples/**'],
|
js: ['src/**/*.js', '!src/**/test/**/*'],
|
||||||
|
e2e: ['src/**/test/*/**/*'],
|
||||||
html: 'src/**/*.html',
|
html: 'src/**/*.html',
|
||||||
scss: 'src/components/**/*.scss',
|
scss: 'src/components/**/*.scss',
|
||||||
},
|
},
|
||||||
|
@ -4,21 +4,6 @@ import {Config} from '../../core/config/config';
|
|||||||
import {SlideEdgeGesture} from '../../core/gestures/slide-edge-gesture';
|
import {SlideEdgeGesture} from '../../core/gestures/slide-edge-gesture';
|
||||||
import * as util from '../../util';
|
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
|
// AsideParent is just a temporary directive
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-aside-parent'
|
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
|
// TODO: remove this. setTimeout has to be done so the bindings can be applied
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let Comp = asideConfig.invoke(this);
|
|
||||||
console.log('using', Comp);
|
|
||||||
|
|
||||||
let GestureConstructor = {
|
let GestureConstructor = {
|
||||||
left: LeftAsideSlideGesture,
|
left: LeftAsideSlideGesture,
|
||||||
top: TopAsideSlideGesture,
|
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