Skip to content

Instantly share code, notes, and snippets.

Forked from csrui/gulpfile.js
Created Mar 29, 2018
What would you like to do?
Generic gulpfile for CakePHP apps. Compiles and minifies sass. Minifies and lints javascript. Generates documentation with yuidoc
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
var yuidoc = require("gulp-yuidoc");
// var chmod = require('gulp-chmod');
// var notify = require("gulp-notify");
// Lint Task
gulp.task('lint', function() {
return gulp.src('./src/scripts/*.js')
// Compile Our Sass
gulp.task('sass', function() {
return gulp.src('./src/scss/*.scss')
processImport: false
suffix: ".min"
gulp.task('docs', function() {
return gulp.src(["./src/scripts/*.js", "./app/Controller/*.php", "./app/Model/*.php"])
// Concatenate & Minify JS
gulp.task('scripts', function() {
return gulp.src('./src/scripts/*.js')
suffix: ".min"
gulp.task('permissions', function () {
// Watch Files For Changes
gulp.task('watch', function() {'./src/scripts/*.js', ['lint', 'scripts']);'./src/scss/*.scss', ['sass']);
// Default Task
gulp.task('default', ['sass', 'scripts', 'watch', 'docs']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment