mirror of
https://github.com/strapi/strapi.git
synced 2025-11-04 20:07:19 +00:00
16 lines
331 B
JavaScript
16 lines
331 B
JavaScript
'use strict';
|
|
|
|
const { join } = require('path');
|
|
const { exists } = require('fs-extra');
|
|
const loadFiles = require('../load/load-files');
|
|
|
|
module.exports = async ({ dir }) => {
|
|
const groupsDir = join(dir, 'groups');
|
|
|
|
if (!(await exists(groupsDir))) {
|
|
return {};
|
|
}
|
|
|
|
return await loadFiles(groupsDir, '*.*(js|json)');
|
|
};
|