How to use the @vuepress/shared-utils.chalk.magenta function in @vuepress/shared-utils

To help you get started, we’ve selected a few @vuepress/shared-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vuejs / vuepress / packages / @vuepress / core / lib / node / plugin-api / index.js View on Github external
function pluginLog (name, shortcut) {
  return shortcut
    ? `Apply plugin ${chalk.magenta(shortcut)} ${chalk.gray(`(i.e. "${name}")`)} ...`
    : `Apply plugin ${chalk.magenta(name)} ...`
}
github vuejs / vuepress / packages / @vuepress / core / lib / node / internal-plugins / style / index.js View on Github external
async ready () {
    const { sourceDir, writeTemp, themeAPI } = ctx

    const overridePath = path.resolve(sourceDir, '.vuepress/override.styl')
    const hasUserOverride = fs.existsSync(overridePath)

    if (hasUserOverride) {
      logger.tip(`${chalk.magenta('override.styl')} has been deprecated from v1.0.0, using ${chalk.cyan('.vuepress/styles/palette.styl')} instead.\n`)
    }

    const themeStyle = path.resolve(themeAPI.theme.path, 'styles/index.styl')
    const userStyle = path.resolve(sourceDir, '.vuepress/styles/index.styl')

    const themeStyleContent = fs.existsSync(themeStyle)
      ? `@import(${JSON.stringify(themeStyle.replace(/[\\]+/g, '/'))})`
      : ''

    const userStyleContent = fs.existsSync(userStyle)
      ? `@import(${JSON.stringify(userStyle.replace(/[\\]+/g, '/'))})`
      : ''

    let styleContent = themeStyleContent + userStyleContent

    if (themeAPI.existsParentTheme) {
github vuejs / vuepress / packages / @vuepress / core / lib / node / loadTheme.js View on Github external
if (!theme.path) {
    throw new Error(
      '[vuepress] You must specify a theme, or create a local custom theme. \n'
        + 'For more details, refer to https://vuepress.vuejs.org/guide/custom-themes.html#custom-themes. \n'
    )
  }

  let applyTip = `Apply theme ${chalk.magenta(theme.name)}`
  theme.entry.name = '@vuepress/internal-theme-entry-file'

  let parentTheme = {}
  if (theme.entry.extend) {
    parentTheme = resolveTheme(ctx, themeResolver, true, theme.entry.extend)
    parentTheme.entry.name = '@vuepress/internal-parent-theme-entry-file'
    applyTip += chalk.gray(` (extends ${chalk.magenta(parentTheme.name)})`)
  }

  logger.tip(applyTip + ' ...')

  logger.debug('theme', theme.name, theme.path)
  logger.debug('parentTheme', parentTheme.name, parentTheme.path)
  return new ThemeAPI(theme, parentTheme)
}
github vuejs / vuepress / packages / @vuepress / core / lib / node / plugin-api / index.js View on Github external
function pluginLog (name, shortcut) {
  return shortcut
    ? `Apply plugin ${chalk.magenta(shortcut)} ${chalk.gray(`(i.e. "${name}")`)} ...`
    : `Apply plugin ${chalk.magenta(name)} ...`
}