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:
parent
80725eedd6
commit
8b763ef509
@ -33,6 +33,6 @@
|
|||||||
"glob": "~3.2.9",
|
"glob": "~3.2.9",
|
||||||
"async": "~0.7.0",
|
"async": "~0.7.0",
|
||||||
"pad": "~0.0.4",
|
"pad": "~0.0.4",
|
||||||
"regen": "~0.0.1"
|
"regen": "~0.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
src/index.js
19
src/index.js
@ -18,6 +18,9 @@ exports.build = function(opts) {
|
|||||||
largeSize: 1000
|
largeSize: 1000
|
||||||
});
|
});
|
||||||
|
|
||||||
|
opts.input = path.resolve(opts.input);
|
||||||
|
opts.output = path.resolve(opts.output);
|
||||||
|
|
||||||
thumbs.sizes.thumb = opts.thumbSize;
|
thumbs.sizes.thumb = opts.thumbSize;
|
||||||
thumbs.sizes.large = opts.largeSize;
|
thumbs.sizes.large = opts.largeSize;
|
||||||
|
|
||||||
@ -66,8 +69,8 @@ exports.build = function(opts) {
|
|||||||
|
|
||||||
function photoLarge(callback) {
|
function photoLarge(callback) {
|
||||||
regen({
|
regen({
|
||||||
source: opts.input,
|
cwd: opts.input,
|
||||||
filter: '**/*.{jpg,jpeg,png}',
|
src: '**/*.{jpg,jpeg,png}',
|
||||||
dest: media + '/large/$path/$name.$ext',
|
dest: media + '/large/$path/$name.$ext',
|
||||||
process: thumbs.photoLarge
|
process: thumbs.photoLarge
|
||||||
}, callback);
|
}, callback);
|
||||||
@ -75,8 +78,8 @@ exports.build = function(opts) {
|
|||||||
|
|
||||||
function photoThumbs(callback) {
|
function photoThumbs(callback) {
|
||||||
regen({
|
regen({
|
||||||
source: opts.input,
|
cwd: opts.input,
|
||||||
filter: '**/*.{jpg,jpeg,png}',
|
src: '**/*.{jpg,jpeg,png}',
|
||||||
dest: media + '/thumbs/$path/$name.$ext',
|
dest: media + '/thumbs/$path/$name.$ext',
|
||||||
process: thumbs.photoSquare
|
process: thumbs.photoSquare
|
||||||
}, callback);
|
}, callback);
|
||||||
@ -84,8 +87,8 @@ exports.build = function(opts) {
|
|||||||
|
|
||||||
function videoLarge(callback) {
|
function videoLarge(callback) {
|
||||||
regen({
|
regen({
|
||||||
source: opts.input,
|
cwd: opts.input,
|
||||||
filter: '**/*.{mp4,mov}',
|
src: '**/*.{mp4,mov}',
|
||||||
dest: media + '/large/$path/$name.jpg',
|
dest: media + '/large/$path/$name.jpg',
|
||||||
process: thumbs.videoLarge
|
process: thumbs.videoLarge
|
||||||
}, callback);
|
}, callback);
|
||||||
@ -93,8 +96,8 @@ exports.build = function(opts) {
|
|||||||
|
|
||||||
function videoThumbs(callback) {
|
function videoThumbs(callback) {
|
||||||
regen({
|
regen({
|
||||||
source: opts.input,
|
cwd: opts.input,
|
||||||
filter: '**/*.{mp4,mov}',
|
src: '**/*.{mp4,mov}',
|
||||||
dest: media + '/thumbs/$path/$name.jpg',
|
dest: media + '/thumbs/$path/$name.jpg',
|
||||||
process: thumbs.videoSquare
|
process: thumbs.videoSquare
|
||||||
}, callback);
|
}, callback);
|
||||||
|
Loading…
Reference in New Issue
Block a user