Skip to content

Commit

Permalink
Sample random squirrels.
Browse files Browse the repository at this point in the history
  • Loading branch information
Droogans committed Feb 12, 2014
1 parent 5617c8c commit 2b397fa
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions grunt-tasks/squirrel.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
/*jshint node:true */
var _ = require('lodash');

module.exports = function (grunt) {
grunt.registerTask('squirrel', 'Logs a shipit squirrel', function () {
var squirrel =
' _-------_ _______________\n' +
' .\' ..::. `\\ / \\\n' +
' / .::\' `\'` / | Ship it! v<%= pkg.version %> |\n' +
' / .::\' .--.=; / ________________/\n' +
' | ::\' / C ..\\ / /\n' +
' | :: | \\ _.) <_/\n' +
' \\ \':| / \\\n' +
' \'-, \\./ \\)\\)\n' +
' `-| );/\n' +
' \'--\'-\'\'';

var squirrels = [
[' _-------_ _______________',
' .\' ..::. `\\ / \\',
' / .::\' `\'` / | Ship it! v<%= pkg.version %> |',
' / .::\' .--.=; / ________________/',
' | ::\' / C ..\\ / /',
' | :: | \\ _.) <_/',
' \\ \':| / \\',
' \'-, \\./ \\)\\)',
' `-| );/',
' \'--\'-\'\''],
[' _-------_ _______________',
' .\' ..::. `\\ / \\',
' / .::\' `\'` / | Ship it! v<%= pkg.version %> |',
' / .::\' .--.=; / ________________/',
' | ::\' / C ..\\ / /',
' | :: | \\ _.) <_/',
' \\ \':| / \\',
' \'-, \\./ \\)\\)',
' `-| );/',
' \'--\'-\'\'']
];

squirrel = grunt.template.process(squirrel);
var squirrel = grunt.template.process(_.sample(squirrels).join('\n'));
console.log(squirrel);
});
};
};

0 comments on commit 2b397fa

Please sign in to comment.