How to use the @gitmoji-changelog/core.logger.success function in @gitmoji-changelog/core

To help you get started, we’ve selected a few @gitmoji-changelog/core 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 frinyvonnick / gitmoji-changelog / packages / gitmoji-changelog-cli / src / cli.js View on Github external
const newOptions = set(options, 'meta.lastVersion', lastVersion)

        // Handle the case where changelog file exist but there isn't a previous version
        if (options.mode === 'update' && !lastVersion) {
          newOptions.mode = 'init'

          fs.unlinkSync(options.output)
        }

        const changelog = await getChangelog(newOptions, projectInfo)

        logMetaData(changelog)
        await buildMarkdownFile(changelog, newOptions)
      }
    }
    logger.success(`changelog updated into ${options.output}`)
  } catch (e) {
    logger.error(e)
  }

  // force quit (if the latest version request is pending, we don't wait for it)
  return process.exit(0)
}