markdown-styleguide-generator
markdown-styleguide-generator copied to clipboard
Feature request: ability to run w/o installing globally
This tool looks very promising, but documentation says I have to install it globally (npm install -g markdown-styleguide-generator). I would like to be able to distribute this across my team without making them do any special setup beyond npm install in our CSS package.
I have tried to make it work with an npm install local to the package, but I can't get it to run. Is there a way to make this happen? If so, can you document it? If not, why not?
If you run the script through npm, it will work locally. The issue is a matter of environmental scope, and npm scripts handle that automatically.
In your package.json, under "scripts", add this:
"styleguide": "node node_modules/markdown-styleguide-generator/index.js"
Your new command, instead of styleguide, would be npm run styleguide.
Hope that helps.
You can use the command npx styleguide to run styleguide from local node_modules