lukeapage / node-markdown-spellcheck

spellchecks markdown files
145 stars 58 forks source link

Use .spelling file to spell check multiple docs from different directories #123

Closed donganzh-zz closed 5 years ago

donganzh-zz commented 5 years ago

@robatwilliams @lukeapage @gaboesquivel Thanks for your help! I am working on automating the spell check for all the documents on my website which involves multiple directories. Currently, after I added custom words in the .spelling file, the document in the same directory as this tool works fine, but if I wanna use it for other directories' document, where should I put the .spelling file? or how should I include it in the command line? or is there a way to include it in the scripts field in package.json? I am sure there must be a way to use the .spelling with multiple docs. Below is my current package.json file which could spell check multiple files without .spelling. "scripts": { "mdspell": "mdspell --report --en-us --ignore-acronyms ../docs/**/*.md ./versioned_docs/**/*.md", },

robatwilliams commented 5 years ago

Sounds like you're doing the right thing. Could you put up a minimal reproduction repo?

donganzh-zz commented 5 years ago

Thanks I'll put up a repo later. Meanwhile, should I work on the configuring the npm package.json or finding the right place for .spelling file?

donganzh-zz commented 5 years ago

@robatwilliams here is our minimal repo, the package.json file is under website directory, and the documents we need to check are under docs. Right now this tool works with multiple files, how do I add the .spelling file to make it work for multiple files as well? https://gitlab.com/elasticpath/reference-experience/docs-storefront-react

robatwilliams commented 5 years ago

The tool looks for the spelling file in the current working directory. So you either put the file there or cd to where it is as part of your npm script.

donganzh-zz commented 5 years ago

@robatwilliams yes it works! Thanks a lot! One more question is there a way to use this tool across multiple document repos so that I could only use one .spelling file?