Check for duplicates
Description
docs_tasks are hardly gulp tasks, only 2 things use streams and those can be replaced.
most of the functions here are doing string manipulation to rename things, get the titles out of links, etc. ideally those functions would have their own unit tests so we don't break the docs one day, but right now it would be a nightmare to unit test because they're all wrapped up in gulp.
just convert this to a normal node script.
convertToMdx is at least the gulpiest function we have, but it can still be done with just regex/replace and then changing the file suffix in the output path.
removeRenames is removing the string _2 from the api.json file. this can also just be a function.
- pretty much everything else can just be a function that takes in strings and outputs strings. easier to unit test.
right now, we are doing 4 separate passes over each of 4000 files. so each file has to be opened, modified, rewritten 4 times. but we can collapse that into 1 pass per file to do all the transforms at once instead of split up like this.
Reproduction steps
Priority
No response
Stack trace
Screenshots
No response
Browsers
No response
Check for duplicates
Description
docs_tasks are hardly gulp tasks, only 2 things use streams and those can be replaced.
most of the functions here are doing string manipulation to rename things, get the titles out of links, etc. ideally those functions would have their own unit tests so we don't break the docs one day, but right now it would be a nightmare to unit test because they're all wrapped up in gulp.
just convert this to a normal node script.
convertToMdxis at least the gulpiest function we have, but it can still be done with just regex/replace and then changing the file suffix in the output path.removeRenamesis removing the string_2from the api.json file. this can also just be a function.right now, we are doing 4 separate passes over each of 4000 files. so each file has to be opened, modified, rewritten 4 times. but we can collapse that into 1 pass per file to do all the transforms at once instead of split up like this.
Reproduction steps
Priority
No response
Stack trace
Screenshots
No response
Browsers
No response