UNPKG

@vuepress-denaro/core

Version:
15 lines (14 loc) 496 B
import { pluginNamePrefix } from '@vuepress-denaro/core'; import { ensureEndingSlash, path } from '../utils/index.js'; export const usePluginConstant = (pluginName, dirname) => { const CLIENT_FOLDER = dirname ? ensureEndingSlash(path.resolve(dirname, '../client')) : ''; return { PLUGIN_NAME: `${pluginNamePrefix}${pluginName}`, ...(dirname && { CLIENT_FOLDER, CLIENT_CONFIG_FILE: `${CLIENT_FOLDER}config.js`, }), }; };