-
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathupdate-syntax.js
More file actions
23 lines (18 loc) · 739 Bytes
/
update-syntax.js
File metadata and controls
23 lines (18 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* Migration script to update markdown-magic syntax from doc-gen to docs
*
* This script was used to migrate the codebase from the old 'doc-gen' syntax
* to the new 'docs' syntax. It serves as an example of how to use the
* generic migration utilities.
*
* For creating custom migrations, see packages/block-migrator package
*/
const { migrateDocGenToDocs } = require('./packages/block-migrator/src/index')
async function updateMarkdownFiles() {
console.log('Migrating doc-gen syntax to docs...\n');
const result = await migrateDocGenToDocs({
verbose: true
});
console.log(`\nMigration complete! Updated ${result.filesUpdated} of ${result.filesProcessed} files.`);
}
updateMarkdownFiles().catch(console.error);