e9544e8f8f
- The albums view is stored in memory when changing from the albums to the individual album/photo view. - When viewing photos, the next picture in the current album is preloaded. * Default sort order of albums is changed from new to old. * Fixed scroll position when changing from albums to album and vice versa
69 lines
1.6 KiB
JavaScript
69 lines
1.6 KiB
JavaScript
var gulp = require('gulp'),
|
|
plugins = require("gulp-load-plugins")();
|
|
|
|
paths = {
|
|
view: [
|
|
'bower_components/jQuery/dist/jquery.min.js',
|
|
'bower_components/js-md5/js/md5.min.js',
|
|
'bower_components/mousetrap/mousetrap.min.js',
|
|
'bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js',
|
|
'../assets/js/_frameworks.js',
|
|
'../assets/js/build.js',
|
|
'../assets/js/view/main.js'
|
|
],
|
|
js: [
|
|
'bower_components/jQuery/dist/jquery.min.js',
|
|
'bower_components/js-md5/js/md5.min.js',
|
|
'bower_components/mousetrap/mousetrap.min.js',
|
|
'bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js',
|
|
'../assets/js/*.js'
|
|
],
|
|
css: [
|
|
'../assets/css/*.css'
|
|
]
|
|
}
|
|
|
|
gulp.task('view', function () {
|
|
|
|
gulp.src(paths.view)
|
|
.pipe(plugins.concat('view.js', {newLine: "\n"}))
|
|
.pipe(plugins.uglify())
|
|
.pipe(gulp.dest('../assets/min/'));
|
|
|
|
});
|
|
/*
|
|
gulp.task('js', function () {
|
|
|
|
gulp.src(paths.js)
|
|
.pipe(plugins.concat('main.js', {newLine: "\n"}))
|
|
.pipe(plugins.uglify())
|
|
.pipe(gulp.dest('../assets/min/'));
|
|
|
|
});
|
|
*/
|
|
|
|
gulp.task('js', function () {
|
|
|
|
gulp.src(paths.js)
|
|
.pipe(plugins.concat('main.js', {newLine: "\n"}))
|
|
.pipe(gulp.dest('../assets/min/'));
|
|
|
|
});
|
|
|
|
gulp.task('css', function () {
|
|
|
|
gulp.src(paths.css)
|
|
.pipe(plugins.concat('main.css', {newLine: "\n"}))
|
|
.pipe(plugins.autoprefixer('last 4 versions', '> 5%'))
|
|
.pipe(plugins.minifyCss())
|
|
.pipe(gulp.dest('../assets/min/'));
|
|
|
|
});
|
|
|
|
gulp.task('default', ['view', 'js', 'css']);
|
|
|
|
gulp.task('watch', ['default'], function() {
|
|
gulp.watch(paths.view, ['view']);
|
|
gulp.watch(paths.js, ['js']);
|
|
gulp.watch(paths.css, ['css']);
|
|
}); |