2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-11 07:10:26 +00:00

Upgrade to regen 0.0.3

This commit is contained in:
rprieto 2014-04-25 23:58:05 +10:00
parent 80725eedd6
commit 8b763ef509
2 changed files with 12 additions and 9 deletions

View File

@ -33,6 +33,6 @@
"glob": "~3.2.9",
"async": "~0.7.0",
"pad": "~0.0.4",
"regen": "~0.0.1"
"regen": "~0.0.3"
}
}

View File

@ -18,6 +18,9 @@ exports.build = function(opts) {
largeSize: 1000
});
opts.input = path.resolve(opts.input);
opts.output = path.resolve(opts.output);
thumbs.sizes.thumb = opts.thumbSize;
thumbs.sizes.large = opts.largeSize;
@ -66,8 +69,8 @@ exports.build = function(opts) {
function photoLarge(callback) {
regen({
source: opts.input,
filter: '**/*.{jpg,jpeg,png}',
cwd: opts.input,
src: '**/*.{jpg,jpeg,png}',
dest: media + '/large/$path/$name.$ext',
process: thumbs.photoLarge
}, callback);
@ -75,8 +78,8 @@ exports.build = function(opts) {
function photoThumbs(callback) {
regen({
source: opts.input,
filter: '**/*.{jpg,jpeg,png}',
cwd: opts.input,
src: '**/*.{jpg,jpeg,png}',
dest: media + '/thumbs/$path/$name.$ext',
process: thumbs.photoSquare
}, callback);
@ -84,8 +87,8 @@ exports.build = function(opts) {
function videoLarge(callback) {
regen({
source: opts.input,
filter: '**/*.{mp4,mov}',
cwd: opts.input,
src: '**/*.{mp4,mov}',
dest: media + '/large/$path/$name.jpg',
process: thumbs.videoLarge
}, callback);
@ -93,8 +96,8 @@ exports.build = function(opts) {
function videoThumbs(callback) {
regen({
source: opts.input,
filter: '**/*.{mp4,mov}',
cwd: opts.input,
src: '**/*.{mp4,mov}',
dest: media + '/thumbs/$path/$name.jpg',
process: thumbs.videoSquare
}, callback);