gulp Standardroutine

var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var order = require('gulp-order');

gulp.task('default', function() {
	//Standard hier
});

gulp.task('sass', function() {
	return gulp.src('resources/assets/sass/app.scss')
		.pipe(sass())
		.pipe(gulp.dest('public/css'))
		.pipe(sass({outputStyle: 'compressed'}))
		.pipe(rename('app.min.css'))
		.pipe(gulp.dest('public/css'));
});

gulp.task('scripts', function() {
	return gulp.src('resources/assets/js/**/*.js')
		.pipe(order([
			'plugins/jquery*.js',
			'plugins/*.js',
			'*.js'

		]))
		.pipe(concat('app.js'))
		.pipe(gulp.dest('public/js'))
		.pipe(rename('app.min.js'))
		.pipe(uglify())
		.pipe(gulp.dest('public/js'));
});

gulp.task('min', ['sass', 'scripts']);

gulp.task('watch', function() {
	gulp.watch('resources/assets/sass/**/*.scss', ['sass']);
	gulp.watch('resources/assets/js/**/*.js', ['scripts']);
});