diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5d825a..0fd4959 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,3 +19,9 @@ npm run test ```shell npm run lint ``` + +### Building + +```shell +npm run build +``` diff --git a/README.md b/README.md index ebbba5d..a66a095 100644 --- a/README.md +++ b/README.md @@ -79,18 +79,18 @@ const items = convertDescriptionToItems(description, { parseToDOM }); console.log(JSON.stringify(items)); ``` +> [!CAUTION] +> Any option to `convertDescriptionToItems` that is not mentioned in the documentation is subject to change. If you +> need anything more than the listed options, ask a question by opening an issue or contribute by creating a pull +> request. + ### CLI ```shell -$ echo "
Hello World
" | convert-description +$ echo "Hello World
" | npx @allegro/convert-description [{"type":"TEXT","content":"Hello World
"}] ``` -> [!CAUTION] -> Any option to `convertDescriptionToItems` that is not mentioned in the documentation is subject to change. If you -> need anything more than the listed options, ask a question by opening an issue or contribute by creating a pull -> request. - [Allegro Rest API]: https://developer.allegro.pl/tutorials/list-offer-assigned-product-one-request-D7Kj9M71Bu6 [DOM API]: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model [jsdom]: https://github.com/jsdom/jsdom diff --git a/bin/index.js b/bin/index.js index eefa6b1..7a6cf6c 100755 --- a/bin/index.js +++ b/bin/index.js @@ -16,6 +16,7 @@ const convertDescription = (inputStream, outputStream) => { outputStream.write( JSON.stringify(convertDescriptionToItems(inputData, { parseToDOM })), ); + outputStream.write("\n"); }); };