devbridge / Styleguide

MIT License
1.44k stars 87 forks source link

Initializing styleguide in a folder breaks paths #164

Closed stevepiron closed 8 years ago

stevepiron commented 8 years ago

FYI

In my case, my .dev points to a public/ directory in my project.

root/
--public/
----styleguide/

When I ran styleguide initialize public/styleguide, the config file got generated as follows:

...
"snippetTemplate": "public/styleguide/template.html",
"sassVariables": [],
"maxSassIterations": 2000,
"database": "public/styleguide/db",
"categories": "public/styleguide/db/categories.txt",
"uniques": "public/styleguide/db/uniques.txt",
"sassData": "public/styleguide/db/sassdata.txt",
...

...which resulted in bad requests:

project.dev/public/styleguide/db/categories.txt 404 (Not found)

To fix this, I have updated all lines to remove public/ before styleguide.

miezis commented 8 years ago

This is not an issue with styleguide. It's the specifics of how your server is configured, your entry point for serving files is public, which in this case would be root for server.

Is your gulpfile placed in directory above public? Is styleguide API working correctly in this case?