2

I'm using express generator. After running the generator it outputs the following:

   install dependencies:
     $ cd . && npm install

What is the point of cd .?

3
  • cd . just means current directory, && say do both . don't see much point of cd . where did you find the code. Jun 17, 2017 at 10:40
  • @RiazLaskar ^^ description. Jun 17, 2017 at 10:42
  • ya viewed the page first, don't see it. Jun 17, 2017 at 10:45

1 Answer 1

5

It means that you ran this:

$ express

(or possibly express .)

In other words, you told express-generator to create a project in the current working directory. Alternatively, you could have provided a subdirectory name:

$ express foo

In that case, the commandline it generates makes a bit more sense:

install dependencies:
  $ cd foo && npm install
1
  • 1
    Totally makes sense. They probably didn't find it worthwhile to do an if condition to check for the working directory. Jun 17, 2017 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.