You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
403 B
20 lines
403 B
/**
|
|
* componentExists
|
|
*
|
|
* Check whether the given component exist in either the components or containers directory
|
|
*/
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const pathModules = path.join(__dirname, '../../../src/modules');
|
|
|
|
const modules = fs.readdirSync(pathModules);
|
|
|
|
function moduleExists(store) {
|
|
return modules.indexOf(store) >= 0;
|
|
}
|
|
|
|
module.exports = {
|
|
moduleExists,
|
|
};
|