mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
28 lines
538 B
JavaScript
28 lines
538 B
JavaScript
const PLUGINS = 'plugins'
|
|
const BUILD = 'build'
|
|
const WATCH = 'watch'
|
|
|
|
/**
|
|
* @package Plugins Controller
|
|
* @param { String } type
|
|
*/
|
|
const pluginsController = (type) => {
|
|
switch (type) {
|
|
case PLUGINS:
|
|
const path = require('path')
|
|
return [
|
|
{
|
|
folder: path.join(__dirname, 'plugins/core'),
|
|
name: 'core'
|
|
}
|
|
]
|
|
case BUILD:
|
|
return require('./build.js')
|
|
case WATCH:
|
|
return require('./watch.js')
|
|
default:
|
|
return
|
|
}
|
|
}
|
|
|
|
module.exports = pluginsController |