Last active
February 25, 2016 22:03
-
-
Save JeremyEnglert/b9d8fc62cee72ae2509a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PACKAGE.JSON // | |
{ | |
"name": "JointsWP-Builder", | |
"version": "4.0.0", | |
"description": "Converts Sass version to CSS version.", | |
"repository": { | |
"type": "git", | |
"url": "" | |
}, | |
"author": "Jeremy Englert", | |
"license": "GPL-2.0 AND MIT", | |
"homepage": "https://github.com/JeremyEnglert/JointsWP", | |
"devDependencies": { | |
"del": "^2.2.0", | |
"gulp": "^3.9.0", | |
"gulp-copy": "0.0.2", | |
"gulp-util": "^3.0.5" | |
} | |
} | |
// GULPFILE.JS // | |
// Grab our gulp packages | |
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
copy = require('gulp-copy'), | |
del = require('del') | |
// Clear out the Joints-CSS directory | |
gulp.task('delete', function () { | |
return del([ | |
// Delete all files... | |
'JointsWP-css/**/*', | |
// Except these ones | |
'!JointsWP-css/assets/functions/enqueue-scripts.php', | |
'!JointsWP-css/assets/functions', | |
'!JointsWP-css/assets/css/*', | |
'!JointsWP-css/assets/css', | |
'!JointsWP-css/assets', | |
'!JointsWP-css/style.css', | |
'!JointsWP-css/.git', | |
'!JointsWP-css/README.md' | |
]); | |
fs.writeFile('filename', 'data', opts, function (err) { | |
cb(err); // if err is not null and not undefined, the process will stop | |
}); | |
}); | |
// Copy Joints-Sass to Joints-CSS | |
gulp.task('copy', ['delete'], function() { | |
return gulp.src([ | |
// Copy all files... | |
'JointsWP-sass/**', | |
// Except these ones | |
'!JointsWP-sass/assets/functions/enqueue-scripts.php', | |
'!JointsWP-sass/assets/js/scripts/**', | |
'!JointsWP-sass/assets/js/scripts/', | |
'!JointsWP-sass/assets/js/foundation.js', | |
'!JointsWP-sass/assets/js/foundation.min.js', | |
'!JointsWP-sass/assets/css/*', | |
'!JointsWP-sass/assets/css', | |
'!JointsWP-sass/assets/scss/**', | |
'!JointsWP-sass/assets/scss', | |
'!JointsWP-sass/style.css', | |
'!JointsWP-sass/config.codekit', | |
'!JointsWP-sass/.git', | |
'!JointsWP-sass/package.json', | |
'!JointsWP-sass/bower.json', | |
'!JointsWP-sass/gulpfile.js', | |
'!JointsWP-sass/README.md' | |
]) | |
.pipe(gulp.dest('./JointsWP-css')); | |
}); | |
// Create a default task | |
gulp.task('default', ['delete', 'copy']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment