0

When calling a grunt task what is the difference between using a single - or double -- for a flag/option as both seem to work.

grunt compile --watch

grunt compile -watch

Also when saving a grunt task you often see --save-dev

I know functionally what this does, but "flag/optionwise" what is the purpose of -dev coming immediately after --save and whats actually happening?

Mike Mellor
  • 1,316
  • 17
  • 22

1 Answers1

1

You are asking two different questions. Your first question has nothing to do with Grunt or NodeJS and it is answered here.

The second question, I think you are talking about npm or bower.

  • --save will add the package to the dependencies object.
  • --save-dev will add the package to the devDependencies object.

More details about the difference and when to use each one is here.

Community
  • 1
  • 1
Ahmad Alfy
  • 13,107
  • 6
  • 65
  • 99