markdown-magic 3.6.2 → 3.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-magic",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "Automatically update markdown files with content from external sources",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -206,7 +206,7 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
206
206
  success(` Markdown Magic Starting...`, silent, '✨ ')
207
207
  logger(`${LINE}\n`)
208
208
 
209
- info(`Searching for comment blocks...`, silent, '🔎 ')
209
+ info(` Searching for comment blocks...`, silent, '🔎 ')
210
210
  logger(`\nSyntax: ${syntax}`)
211
211
  logger(`Block Open: ${open}`)
212
212
  logger(`Block Close: ${close}`)
@@ -465,9 +465,9 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
465
465
  }
466
466
 
467
467
  logger()
468
- info(`Available Transforms:`, silent, '🔁 ')
468
+ info(` Available Transforms:`, silent, '🔁 ')
469
469
  logger(`\n${Object.keys(useTransforms).join(', ')}\n`)
470
- info(`Syntax example:`, silent, '🧱 ')
470
+ info(` Syntax example:`, silent, '🧱 ')
471
471
  logger()
472
472
  logCommentBlockSyntax({
473
473
  syntax: syntax,
@@ -551,7 +551,7 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
551
551
  results: plan
552
552
  }
553
553
  } else {
554
- info(`Parse results:`, silent, "🟢 ")
554
+ info(` Parse results:`, silent, "🟢 ")
555
555
  const total = planTotal + missingTotal
556
556
  logger()
557
557
  logger(`Total transforms: ${total}`)
@@ -576,11 +576,11 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
576
576
  // logger('\nStats:')
577
577
 
578
578
  if (planOutput.length) {
579
- info(`Execution plan:`, silent, "📑 ")
579
+ info(` Execution plan:`, silent, "📑 ")
580
580
  logger()
581
581
  logger(planOutput.join('\n'))
582
582
  } else {
583
- info(`Execution plan:`, silent, "📑 ")
583
+ info(` Execution plan:`, silent, "📑 ")
584
584
  logger('\nNo transforms to run. Exiting markdown magic early.')
585
585
  logger('If you think this is incorrect, verify your comment blocks in your src and the settings in your config.')
586
586
  }
@@ -674,7 +674,7 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
674
674
  process.exit(1)
675
675
  /** */
676
676
  logger()
677
- info(`Results:`, silent, "💫 ")
677
+ info(` Results:`, silent, "💫 ")
678
678
 
679
679
  /*
680
680
  TODO:
@@ -24,7 +24,6 @@ const path = require('path')
24
24
  * @return {string} Updated content to place in the content block
25
25
  */
26
26
  function install(api) {
27
- console.log('INSTALL API', api)
28
27
  const { options } = api
29
28
  const { isDev = false } = options
30
29
  let packageName = options.packageName
@@ -47,12 +46,20 @@ function install(api) {
47
46
  }
48
47
  header = `${header}\n\n`
49
48
 
49
+ if (options.header === false) {
50
+ header = ''
51
+ }
52
+
50
53
  let body = `Install the \`${packageName}\` cli using your favorite package manager.`
51
54
  if (options.body) {
52
55
  body = (options.body.startsWith('\n')) ? options.body : `\n${options.body}`
53
56
  }
54
57
  body = `${body}\n`
55
58
 
59
+ if (options.body === false) {
60
+ body = ''
61
+ }
62
+
56
63
  if (!packageName) {
57
64
  return 'Error: No package name provided'
58
65
  }