From 213fd6bf16a1bc7cd68a8b9ed71dc1c81764618b Mon Sep 17 00:00:00 2001 From: Simon C Date: Fri, 28 Jan 2022 00:18:00 +0100 Subject: [PATCH] feat: Add last newline on markdown file --- index.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 29ec700..471e1bd 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ export default class DirectusToMarkdown { async _writeIndex(item, itemPath) { const frontMatter = this._formatFrontMatter(item) const content = item[this.contentKey] ? item[this.contentKey].toString() : '' - const itemContent = `${frontMatter}${content}` + const itemContent = `${frontMatter}${content}\r\n` const indexName = 'index' // TODO: index or _index ? fs.writeFileSync(`${itemPath}/${indexName}.md`, itemContent) } diff --git a/package-lock.json b/package-lock.json index 48616b4..ea64d7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@resilien/directus-to-markdown", - "version": "1.0.0", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@resilien/directus-to-markdown", - "version": "1.0.0", + "version": "0.2.0", "license": "ISC", "dependencies": { "@directus/sdk": "^9.5.0", diff --git a/package.json b/package.json index 9b007a5..8851ce4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@resilien/directus-to-markdown", - "version": "0.1.0", + "version": "0.2.0", "description": "Export Directus items to markdown files with assets", "main": "index.js", "scripts": {