--- a/tools/migrate-tracker.js Sat Jan 04 02:19:01 2020 +0000
+++ b/tools/migrate-tracker.js Sun Jan 05 18:17:12 2020 +0000
@@ -42,7 +42,9 @@
.filter(path => !/\.\w+\.md$/.test(path))
const frontMatter = getFrontMatter(path)
- const replaces = castReplacesDataToArray(frontMatter.replaces)
+ const replaces = castReplacesDataToArray(frontMatter.replaces).map( + path => path.replace(/^http(s?):\/\//, '') @@ -68,6 +70,7 @@
(acc, path) => acc + (covered.has(path) ? 1 : 0),
+const missing = migrating.filter(path => !covered.has(path)) const percentComplete = ((countOfCovered / migrating.length) * 100).toPrecision(
@@ -79,8 +82,16 @@
tracking ${paths.length} pages
${countOfCovered}/${migrating.length} (${percentComplete}%) migrated
${countOfObsolete} obsoleted
+ ${missing.length} missing +if (process.argv.includes('--write-missing')) { + path.join(__dirname, 'missing-paths.txt'), /*****************************************************************************
* Generate redirection mapping
*****************************************************************************/