config.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Typically the options to control nodemon are passed in via the CLI and are
  2. listed under: nodemon --help options
  3. nodemon can also be configured via a local and global config file:
  4. * $HOME/nodemon.json
  5. * $PWD/nodemon.json OR --config <file>
  6. * nodemonConfig in package.json
  7. All config options in the .json file map 1-to-1 with the CLI options, so a
  8. config could read as:
  9. {
  10. "ext": "*.pde",
  11. "verbose": true,
  12. "exec": "processing --sketch=game --run"
  13. }
  14. There are a limited number of variables available in the config (since you
  15. could use backticks on the CLI to use a variable, backticks won't work in
  16. the .json config).
  17. * {{pwd}} - the current directory
  18. * {{filename}} - the filename you pass to nodemon
  19. For example:
  20. {
  21. "ext": "*.pde",
  22. "verbose": true,
  23. "exec": "processing --sketch={{pwd}} --run"
  24. }
  25. The global config file is useful for setting up default executables
  26. instead of repeating the same option in each of your local configs:
  27. {
  28. "verbose": true,
  29. "execMap": {
  30. "rb": "ruby",
  31. "pde": "processing --sketch={{pwd}} --run"
  32. }
  33. }