Forrest logo
back to the grunt tool

grunt:tldr:a57cb

grunt: Specify an alternative base path for relative files.
$ grunt --base ${path-to-directory}
try on your machine

The command "grunt --base ${path-to-directory}" is used to run a Grunt task with a specific base directory.

  • "grunt" refers to the Grunt command-line interface (CLI) that is used to run Grunt tasks.
  • "--base" is a flag that specifies the base directory for the Grunt task.
  • "${path-to-directory}" is a placeholder for the actual path to the desired directory that will be used as the base directory.

By using this command, you are instructing Grunt to run the task in the context of the specified base directory. This means that any paths and files referenced in the Grunt configuration or task files will be relative to this base directory.

For example, if you execute the command "grunt --base /home/myuser/project", it will set the base directory as "/home/myuser/project" for the Grunt task. Any file references or paths in Gruntfile.js or task files will now be resolved relative to this base directory.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the grunt tool