forked from rojo-rbx/rojo
Use plugin chain code in Vfs
This commit is contained in:
11
src/bin.rs
11
src/bin.rs
@@ -33,6 +33,8 @@ use std::thread;
|
||||
use core::Config;
|
||||
use pathext::canonicalish;
|
||||
use project::{Project, ProjectLoadError};
|
||||
use plugin::{PluginChain};
|
||||
use plugins::{DefaultPlugin, ScriptPlugin};
|
||||
use vfs::Vfs;
|
||||
use vfs_watch::VfsWatcher;
|
||||
|
||||
@@ -148,6 +150,13 @@ fn main() {
|
||||
}
|
||||
};
|
||||
|
||||
lazy_static! {
|
||||
static ref PLUGIN_CHAIN: PluginChain = PluginChain::new(vec![
|
||||
Box::new(ScriptPlugin::new()),
|
||||
Box::new(DefaultPlugin::new()),
|
||||
]);
|
||||
}
|
||||
|
||||
let config = Config {
|
||||
port,
|
||||
verbose,
|
||||
@@ -159,7 +168,7 @@ fn main() {
|
||||
}
|
||||
|
||||
let vfs = {
|
||||
let mut vfs = Vfs::new(config.clone());
|
||||
let mut vfs = Vfs::new(config.clone(), &PLUGIN_CHAIN);
|
||||
|
||||
for (name, project_partition) in &project.partitions {
|
||||
let path = {
|
||||
|
||||
Reference in New Issue
Block a user