1 | var plugin =[{}];
|
2 | exports.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 |
|
11 | exports.savePluginAngular = function(){
|
12 | fs.exists("plugin.conf", function(exists) {
|
13 |
|
14 | if(!exists){
|
15 | fs.open("./plugin.conf",'w+',function(err,fd){
|
16 | fs.write(fd,JSON.stringify(plugin));
|
17 | })
|
18 | }
|
19 | });
|
20 | }
|
21 |
|
22 | exports.getPluginInstalled = function(){
|
23 | return plugin;
|
24 | }
|
25 |
|
26 | exports.setPlugin = function(){
|
27 | var dataPlug = {};
|
28 |
|
29 | } |
\ | No newline at end of file |