/**
 * 含--doc 命令会用到的常量放这里维护
 */
const path = require('path')

// 文档配置路径
export const PROJECT_DOC_ROOT_DIR = '.arkdoc' // 项目组文档模板的存放目录。约定这个文件夹一定要在当前指令执行的路径中出现
export const PROJECT_DOC_CONFIG_DIR = 'config' // 项目组文档模板storybook配置的存放目录
export const STORYBOOK_CONFIG_DIR = '.storybook' // 脚手架中,storybook配置目录
export const DEFAULT_STORYBOOK_CONFIG_DIR = 'default_config' // 脚手架中,存储storybook默认配置的文件夹
export const DOC_DIST = 'storybook-static' // 脚手架storybook打包产物目录
export const DOC_EXAMPLES_DIR = 'examples' // 存放文档例子的文件夹
export const DOC_ASSETS_DIR = 'assets' // 存放文档动态资源的文件夹
export const DOC_SRC_DIR = 'src' // 存放文档核心代码的文件夹
export const PROJECT_DOC_DIST = '.arkdoc-dist' // 文档打包产物的存放在项目组目录

export const DOC_ROOT_PATH = path.resolve(__dirname, '../temp/ark-doc') // 脚手架里storybook模板的根路径
export const PROJECT_DOC_ROOT_PATH = path.resolve(process.cwd(), PROJECT_DOC_ROOT_DIR) // 项目组文档模板的存放路径
export const PROJECT_DOC_DIST_PATH = path.resolve(process.cwd(), PROJECT_DOC_DIST) // 文档打包产物的存放在项目组的路径
export const PROJECT_DOC_CONFIG_PATH = path.join(
  PROJECT_DOC_ROOT_PATH,
  PROJECT_DOC_CONFIG_DIR
) // 项目组文档模板配置的存放路径
export const DEFAULT_STORYBOOK_CONFIG_PATH = path.join(
  DOC_ROOT_PATH,
  DEFAULT_STORYBOOK_CONFIG_DIR
) // 脚手架中,存储storybook默认配置的路径
export const STORYBOOK_CONFIG_PATH = path.join(DOC_ROOT_PATH, STORYBOOK_CONFIG_DIR) // 脚手架中,storybook配置路径
export const STORYBOOK_DIST_PATH = path.join(DOC_ROOT_PATH, DOC_DIST) // 脚手架,storybook打包产物路径
export const STORYBOOK_SRC_PATH = path.join(DOC_ROOT_PATH, DOC_SRC_DIR) // 脚手架里,storybook存放核心代码的文件夹
export const DEFAULT_STORYBOOK_WEBPACK_PATH = path.join(
  DEFAULT_STORYBOOK_CONFIG_PATH,
  'webpack.config.js'
) // 脚手架默认的webpack配置
export const STORYBOOK_WEBPACK_PATH = path.join(
  STORYBOOK_CONFIG_PATH,
  'webpack.config.js'
)// 脚手架.storybook里的的webpack配置

export default {
  PROJECT_DOC_ROOT_DIR,
  PROJECT_DOC_CONFIG_DIR,
  STORYBOOK_CONFIG_DIR,
  DEFAULT_STORYBOOK_CONFIG_DIR,
  DOC_ROOT_PATH,
  PROJECT_DOC_ROOT_PATH,
  PROJECT_DOC_CONFIG_PATH,
  DEFAULT_STORYBOOK_CONFIG_PATH,
  STORYBOOK_CONFIG_PATH,
  STORYBOOK_DIST_PATH,
  DOC_EXAMPLES_DIR,
  DOC_ASSETS_DIR,
  DOC_SRC_DIR,
  STORYBOOK_SRC_PATH,
  PROJECT_DOC_DIST,
  PROJECT_DOC_DIST_PATH,
  DEFAULT_STORYBOOK_WEBPACK_PATH,
  STORYBOOK_WEBPACK_PATH,
}
