diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 45d51b4..711fa08 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -31,6 +31,7 @@ export default defineConfig({ { text: 'Including Custom Styles', link: '/guide/including-custom-styles' }, { text: 'CLI', link: '/guide/cli' }, { text: 'Monorepo', link: '/guide/monorepo' }, + { text: 'Troubleshooting', link: '/guide/troubleshooting' }, ], }, ], diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 9cbb1e6..b4c0293 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -93,3 +93,22 @@ Create the styles directory. ```sh $ mkdir src/styles ``` + +Create the style subdirectories. + +```sh +$ mkdir src/styles/base +$ mkdir src/styles/utilities +$ mkdir src/styles/components +``` + +::: tip + +Each of the subdirectories corresponds to a `json` file in the output directory. +e.g.: `src/styles/base/ -> .styles/base.json` + +You can create as many subdirectories inside your styles directory as you want and give them arbitrary names. Just remember to update the imports from the output directory accordingly. + +If a directory does not include any files, git will not track it. To prevent this you can add an empty `.gitkeep` inside the directory. + +::: diff --git a/docs/guide/monorepo.md b/docs/guide/monorepo.md index 833d7b5..1eaf14f 100644 --- a/docs/guide/monorepo.md +++ b/docs/guide/monorepo.md @@ -24,7 +24,7 @@ import components from './.styles/components.json'; import type { Config } from 'tailwindcss'; -export const plugin = plugin( +export const plugin = _plugin( ({ addComponents, addUtilities, addBase }) => { addBase(base); addUtilities(utilities); diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md new file mode 100644 index 0000000..080f796 --- /dev/null +++ b/docs/guide/troubleshooting.md @@ -0,0 +1,18 @@ +# Troubleshooting + +## `Error: ENOSPC: System limit for number of file watchers reached, watch` + +Linux uses [inotify](https://en.wikipedia.org/wiki/Inotify) to monitor file changes. +This error is due to the file watchers being reached. + +In most cases, restarting the dev-server will fix this issue. + +If you want a permanent solution, you can increase the maximum number of file watchers. + +```sh +# check current number +$ cat /proc/sys/fs/inotify/max_user_watches + +# set a greater value +$ echo fs.inotify.max_user_watches= | sudo tee -a /etc/sysctl.conf && sudo sysctl -p +```