parent
2f45b7339c
commit
761b3584f4
@ -1,5 +1,26 @@ |
||||
'use strict' |
||||
|
||||
module.exports = { |
||||
|
||||
/* |
||||
Defines available API. `key` / `type` |
||||
*/ |
||||
module.exports = (app, compiler) => { |
||||
return { |
||||
config: { |
||||
setConfig: (mod, path, content, cb) => { |
||||
app._api.filesProviders['config'].set(mod + '/' + path, content) |
||||
cb() |
||||
}, |
||||
getConfig: (mod, path, cb) => { |
||||
cb(null, app._api.filesProviders['config'].get(mod + '/' + path)) |
||||
}, |
||||
removeConfig: (mod, path, cb) => { |
||||
cb(null, app._api.filesProviders['config'].remove(mod + '/' + path)) |
||||
if (cb) cb() |
||||
} |
||||
}, |
||||
compiler: { |
||||
getCompilationResult: () => { |
||||
return compiler.lastCompilationResult |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue