UNPKG

594 BJavaScriptView Raw
1var plugin =[{}];
2exports.loadPluginAngular = function(fs){
3 var ret = fs.existsSync("plugin.conf");
4 if(ret){
5 plugin = JSON.parse(fs.readFileSync('plugin.conf', 'utf8'));
6 }else{
7 plugin = ret;
8 }
9}
10
11exports.savePluginAngular = function(){
12 fs.exists("plugin.conf", function(exists) {
13 // console.log("settings.conf" + " exists? " + exists);
14 if(!exists){
15 fs.open("./plugin.conf",'w+',function(err,fd){
16 fs.write(fd,JSON.stringify(plugin));
17 })
18 }
19 });
20}
21
22exports.getPluginInstalled = function(){
23 return plugin;
24}
25
26exports.setPlugin = function(){
27 var dataPlug = {};
28
29}
\No newline at end of file