4

I am working on automating the markdown spell check for all the documents on my website which involves multiple git repo. I have a .spelling file that contains all the word to be excluded from the documents. I would like to keep it one file and updated across the entire website. I can get it to work for one repo. I looked into the npm package method. Is there a way to configure package.json to share this file to many repo? Or is there a better way to do it without npm? Thanks!

enter image description here

Adil B
  • 14,635
  • 11
  • 60
  • 78
Barton Dong
  • 127
  • 11

1 Answers1

3

Make a separate spell-check repository with the .spelling file and script in it, then include it as a submodule in each of your docs repos. You can then reference it from each repository separately, and pull its latest updates into each one.

This could be cumbersome if you have a large number of docs repos, so another alternative is to centralize the spelling check script by making a separate repository for it and adding a configuration file to tell your script which Github repositories to spellcheck. This way, you can selectively apply the spell check process to any number of repositories in your organization.

Adil B
  • 14,635
  • 11
  • 60
  • 78
  • 1
    thanks! I did consider centralizing the spelling check script. In this way should I put it into a npm package and use it across all repositories? By centralizing it, each repo will have access to it, but can they make any update to the `.spelling` file simultaneously? – Barton Dong May 15 '19 at 03:43
  • 1
    I would recommend making a repo for your spelling check script, then using that repo as a submodule in each of your docs repos. That way, anyone can edit the spelling check file once in the spelling check repo, and then pull the latest update on the spelling check file into each docs repo individually - no npm needed. – Adil B May 15 '19 at 06:36