Added spotify import, somewhat still in beta

This commit is contained in:
Kasper Rynning-Tønnesen
2016-08-26 15:48:02 +02:00
parent 5956090c9f
commit 13bb52cded
13 changed files with 339 additions and 23 deletions

View File

@@ -4,7 +4,7 @@ var gulp = require('gulp'),
concat = require('gulp-concat');
gulp.task('js', function () {
gulp.src(['static/js/*.js', '!static/js/embed*', '!static/js/remotecontroller.js'])
gulp.src(['static/js/*.js', '!static/js/embed*', '!static/js/remotecontroller.js', '!static/js/spotify.js'])
.pipe(uglify({
mangle: true,
compress: true,
@@ -25,6 +25,17 @@ gulp.task('embed', function () {
.pipe(gulp.dest('static/dist'));
});
gulp.task('spotify', function () {
gulp.src(['static/js/spotify.js'])
.pipe(uglify({
mangle: true,
compress: true,
enclose: true
}))
.pipe(concat('spotify.min.js'))
.pipe(gulp.dest('static/dist'));
});
/*
gulp.task('nochan', function () {
gulp.src(['static/js/nochan.js', 'static/js/helpers.js'])
@@ -49,8 +60,9 @@ gulp.task('remotecontroller', function () {
});
gulp.task('default', function(){
gulp.watch('static/js/*.js', ['js']);
gulp.watch('static/js/*.js', ['embed']);
gulp.watch('static/js/*.js', ['js']);
gulp.watch('static/js/*.js', ['embed']);
gulp.watch(['static/js/spotify.js', 'static/js/helpers.js'], ['spotify']);
//gulp.watch('static/js/*.js', ['nochan']);
gulp.watch('static/js/remotecontroller.js', ['remotecontroller']);
});
});