emiloberg / markdown-styleguide-generator

Will search all your (s)css files for comments and generate a single page html styleguide
GNU General Public License v3.0
62 stars 19 forks source link

Feature request: ability to run w/o installing globally #8

Open keithjgrant opened 8 years ago

keithjgrant commented 8 years ago

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?

Cleecanth commented 8 years ago

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.

FirstVertex commented 5 years ago

You can use the command npx styleguide to run styleguide from local node_modules