Skip to content

Commit

Permalink
chore: remove figlets, cows and notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
t1st3 committed Jan 16, 2016
1 parent e3b7ad5 commit 4980bc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 58 deletions.
60 changes: 5 additions & 55 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,65 +10,19 @@ del = require('del'),
somebody = require('somebody'),
pkgAuthor = somebody.parse(pkg.author),

figletShown = 0,
figlet = require('figlet'),
cowsay = require('cowsay'),
qrcode = require('qrcode-terminal'),

gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
minifyCSS = require('gulp-minify-css'),
spriteBuilder = require( 'node-spritesheet' ).Builder,
notify = require('gulp-notify');

function displayCowsay (txt, cb) {
console.log('\n\n');
console.log(chalk.magenta(cowsay.say({
text: pkg.name + ' - ' + txt,
e: 'oO',
T: 'U '
})));
console.log('\n\n');
cb();
}

function triggerNotification (title, txt, cb) {
gulp.src('./')
.pipe(notify({
title: pkg.name + ' - ' + title,
message: txt
}));
cb();
}

gulp.task('figlet', [], function (cb) {
if (figletShown === 0) {
figlet.text(pkg.name, {
font: 'Small',
horizontalLayout: 'default',
verticalLayout: 'default'
}, function(err, data) {
if (err) {
console.log('Something went wrong with FIGlet');
console.dir(err);
return;
}
console.log('\n\n');
console.log(chalk.green(data));
console.log(chalk.blue(pkg.version));
console.log('\n\n');
figletShown = 1;
cb();
});
}
});
spriteBuilder = require( 'node-spritesheet' ).Builder;

/*
* BUILD TASK
*/

gulp.task('build_clean', ['figlet'], function () {
gulp.task('build_clean', [], function () {
return del(['./dist/*']);
});

Expand Down Expand Up @@ -109,16 +63,14 @@ gulp.task('imagemin', ['sprite'], function (cb) {
});

gulp.task('build', ['imagemin'], function (cb) {
triggerNotification ('Builder', 'Successfully built application', function () {
displayCowsay('gulp build - DONE', cb);
});
cb();
});

/*
* INFO TASK
*/

gulp.task('info', ['figlet'], function (cb) {
gulp.task('info', [], function (cb) {
var txt;
console.log('\n\n');
console.log('[' + chalk.green('NAME') + '] ' + pkg.name);
Expand All @@ -142,9 +94,7 @@ gulp.task('info', ['figlet'], function (cb) {
console.log('\n\n');
qrcode.generate(pkg.homepage);
console.log('\n\n');
triggerNotification ('Info', 'Rendered the info...', function () {
displayCowsay('gulp info - DONE', cb);
});
cb();
});

gulp.task('default', ['info', 'build']);
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@
"dependencies": {},
"devDependencies": {
"chalk": "~1.1",
"cowsay": "~1.1",
"del": "~2.2.0",
"figlet": "~1.1",
"gulp": "~3.9",
"gulp-imagemin": "~2.4.0",
"gulp-minify-css": "~1.2.3",
"gulp-notify": "~2.2",
"gulp-rename": "~1.2",
"node-spritesheet": "~0.4",
"qrcode-terminal": "~0.10",
Expand Down

0 comments on commit 4980bc3

Please sign in to comment.