mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +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';
|
||||
|
||||
const Sharp = require('./constructor');
|
||||
[
|
||||
'input',
|
||||
'resize',
|
||||
'composite',
|
||||
'operation',
|
||||
'colour',
|
||||
'channel',
|
||||
'output',
|
||||
'utility'
|
||||
].forEach(function (decorator) {
|
||||
require('./' + decorator)(Sharp);
|
||||
});
|
||||
require('./input')(Sharp);
|
||||
require('./resize')(Sharp);
|
||||
require('./composite')(Sharp);
|
||||
require('./operation')(Sharp);
|
||||
require('./colour')(Sharp);
|
||||
require('./channel')(Sharp);
|
||||
require('./output')(Sharp);
|
||||
require('./utility')(Sharp);
|
||||
|
||||
module.exports = Sharp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user