markdown-magic 3.0.4 → 3.0.5

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.
@@ -230,6 +230,8 @@ async function processContents(text, config) {
230
230
  /* Strip block comments from output files */
231
231
  const stripComments = isNewPath && removeComments
232
232
 
233
+ // console.log('srcPath', srcPath)
234
+ // console.log('outputPath', outputPath)
233
235
  const result = {
234
236
  /* Has markdown content changed? */
235
237
  isChanged: text !== updatedContents,
@@ -49,7 +49,8 @@ async function processFile(opts = {}) {
49
49
  return result
50
50
  }
51
51
 
52
- if (result.isChanged) {
52
+ /* If it's changed or its a new file to write */
53
+ if (result.isChanged || result.isNewPath) {
53
54
  let cleanContents = result.updatedContents
54
55
  if (result.stripComments && patterns.openPattern && patterns.closePattern) {
55
56
  cleanContents = result.updatedContents.replace(patterns.openPattern, '').replace(patterns.closePattern, '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-magic",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Automatically update markdown files with content from external sources",
5
5
  "main": "lib/index.js",
6
6
  "bin": {