mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Remove use of dynamic require to facilitate bundling (#960)
This commit is contained in:
parent
3511723914
commit
eca0e66e23
20
lib/index.js
20
lib/index.js
@ -1,17 +1,13 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const Sharp = require('./constructor');
|
const Sharp = require('./constructor');
|
||||||
[
|
require('./input')(Sharp);
|
||||||
'input',
|
require('./resize')(Sharp);
|
||||||
'resize',
|
require('./composite')(Sharp);
|
||||||
'composite',
|
require('./operation')(Sharp);
|
||||||
'operation',
|
require('./colour')(Sharp);
|
||||||
'colour',
|
require('./channel')(Sharp);
|
||||||
'channel',
|
require('./output')(Sharp);
|
||||||
'output',
|
require('./utility')(Sharp);
|
||||||
'utility'
|
|
||||||
].forEach(function (decorator) {
|
|
||||||
require('./' + decorator)(Sharp);
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = Sharp;
|
module.exports = Sharp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user