summaryrefslogtreecommitdiff
path: root/javascript/videojs/build/current-changelog.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/videojs/build/current-changelog.js')
-rw-r--r--javascript/videojs/build/current-changelog.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/javascript/videojs/build/current-changelog.js b/javascript/videojs/build/current-changelog.js
deleted file mode 100644
index a80ef88..0000000
--- a/javascript/videojs/build/current-changelog.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* eslint-disable no-console */
-
-const unified = require('unified');
-const markdown = require('remark-parse');
-const stringify = require('remark-stringify');
-const fs = require('fs');
-
-module.exports = function() {
- const processor = unified()
- .use(markdown, {commonmark: true})
- .use(stringify);
-
- const ast = processor.parse(fs.readFileSync('./CHANGELOG.md'));
- const changelog = [];
-
- changelog.push(processor.stringify(ast.children[0]));
-
- // start at 1 so we get the first anchor tag
- // and can break on the second
- for (let i = 1; i < ast.children.length; i++) {
- let item = processor.stringify(ast.children[i]);
-
- if (/^<a name="/.test(item)) {
- break;
- }
-
- if (/^###/.test(item)) {
- item = '\n' + item + '\n';
- }
-
- changelog.push(item);
- }
-
- return changelog.join('\n');
-};