-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
34 lines (24 loc) · 1.16 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var path = require('path');
var Script = require('./code/script');
// The idea is not only to make the API simple, but also extending this module.
// Ideally, it will be clear to any newcomer how to go about adding features.
// If not, file an issue on GitHub :)
// Currently it's an object. In the future it may be a function-object or something.
var avisynth = {};
// Misc utilities.
avisynth.utils = require('./code/utils');
// Expose modular plugin functionality.
avisynth.addPlugin = require('./code/plugins').addPlugin;
avisynth.newPlugin = require('./code/plugins').newPlugin;
// Load all the core filter plugins.
require('./code/definitions');
// "Loads" a plugin/script globally. It actually stores a reference, that will be loaded
// when running each script.
avisynth.load = require('./code/loader').load;
// Replacement for the lack of an autoloading system (because we're portable).
avisynth.autoload = require('./code/autoload');
// Autoload all the plugins we bundle.
avisynth.autoload(path.resolve(__dirname, 'bin/plugins'));
// Script constructor, note you can safely forget "new".
avisynth.Script = Script.wrappedConstructor;
module.exports = avisynth;