1- import { readdirSync , accessSync , constants } from 'fs' ;
2- import { resolve } from 'path' ;
3- import sharp from 'sharp' ;
4- import async from 'async' ;
1+ 'use strict' ;
2+
3+ var _fs = require ( 'fs' ) ;
4+
5+ var _path = require ( 'path' ) ;
6+
7+ var _sharp = require ( 'sharp' ) ;
8+
9+ var _sharp2 = _interopRequireDefault ( _sharp ) ;
10+
11+ var _async = require ( 'async' ) ;
12+
13+ var _async2 = _interopRequireDefault ( _async ) ;
14+
15+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
516
617module . exports = class ImageCache {
718 /**
@@ -16,7 +27,7 @@ module.exports = class ImageCache {
1627 this . actions = { } ;
1728 this . pluginNames = [ ] ;
1829
19- readdirSync ( resolve ( __dirname , './plugins/' ) ) . forEach ( file => {
30+ ( 0 , _fs . readdirSync ) ( ( 0 , _path . resolve ) ( __dirname , './plugins/' ) ) . forEach ( file => {
2031 let name ;
2132 let plugin ;
2233
@@ -73,7 +84,7 @@ module.exports = class ImageCache {
7384 let sharpInstance ;
7485
7586 try {
76- sharpInstance = sharp ( image ) ;
87+ sharpInstance = ( 0 , _sharp2 . default ) ( image ) ;
7788 } catch ( sharpErr ) {
7889 callback ( sharpErr ) ;
7990 }
@@ -83,7 +94,7 @@ module.exports = class ImageCache {
8394 return sharpInstance . metadata ( ) . then ( info => {
8495 metadata = info ;
8596
86- async . each ( preset . actions , ( action , asyncCallback ) => {
97+ _async2 . default . each ( preset . actions , ( action , asyncCallback ) => {
8798 if ( ! this . actions [ action . action ] ) {
8899 return asyncCallback ( new Error ( `Action ${ action . action } for preset ${ presetName } not found in loaded plugins.` ) ) ;
89100 }
0 commit comments