mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
12 lines
386 B
TypeScript
12 lines
386 B
TypeScript
import path from 'path';
|
|
import fse from 'fs-extra';
|
|
import { pluralize } from './pluralize';
|
|
import { EXTENSION_TYPES } from '../constants';
|
|
|
|
export async function ensureExtensionsDirs(extensionsPath: string): Promise<void> {
|
|
for (const extensionType of EXTENSION_TYPES) {
|
|
const dirPath = path.resolve(extensionsPath, pluralize(extensionType));
|
|
await fse.ensureDir(dirPath);
|
|
}
|
|
}
|