diff --git a/README.md b/README.md index 3d8e1c2..d9fd208 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ pip install django-tailwind [RECOMMENDED IN DEV] If you want to use automatic page reloads during development use the `[reload]` extras, which installs the `django-browser-reload` package in addition: ```bash - pip install django-tailwind[reload] + pip install 'django-tailwind[reload]' ``` Check docs for the [Installation](https://django-tailwind.readthedocs.io/en/latest/installation.html) instructions. diff --git a/docs/installation.md b/docs/installation.md index db01e06..c4dcf41 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -13,7 +13,7 @@ in addition: ```bash - python -m pip install django-tailwind[reload] + python -m pip install 'django-tailwind[reload]' ``` Alternatively, you can install the latest development version via: @@ -181,11 +181,24 @@ this case, you need to set the path to the `npm` executable in *settings.py* fil NPM_BIN_PATH = '/usr/local/bin/npm' ``` -On *Windows* it might look like this: +On *Windows*, you may have npm on `$PATH` but it's `npm.cmd` rather than `npm`. (You can call it from the terminal because `$PATHEXT` contains `.cmd`.) If so, please override the default `NPM_BIN_PATH = 'npm'`: + +```python +NPM_BIN_PATH = 'npm.cmd' +``` + +Alternatively (and for maximum reliability), you can use a fully qualified path. It might look like this: ```python NPM_BIN_PATH = r"C:\Program Files\nodejs\npm.cmd" ``` Please note that the path to the `npm` executable may be different for your system. To get the `npm` path, try running -the command `which npm` in your terminal. +the command `which npm` in your terminal. (On *Windows*, please try `where npm` or `Get-Command npm`) + +If you share codes with others, you can search `$PATH` (and `$PATHEXT` on Windows) dynamically in *settings.py*: + +```python +from shutil import which +NPM_BIN_PATH = which("npm") +```