2021-12-25 14:39:47 +01:00
|
|
|
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')
|
2024-03-29 09:00:10 +01:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
folder: path.join(__dirname, 'plugins/core'),
|
|
|
|
name: 'core'
|
|
|
|
}
|
|
|
|
]
|
2021-12-25 14:39:47 +01:00
|
|
|
case BUILD:
|
2024-03-29 09:00:10 +01:00
|
|
|
return require('./build.js')
|
2021-12-25 14:39:47 +01:00
|
|
|
case WATCH:
|
2024-03-29 09:00:10 +01:00
|
|
|
return require('./watch.js')
|
2021-12-25 14:39:47 +01:00
|
|
|
default:
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-08 13:16:23 +02:00
|
|
|
module.exports = pluginsController
|