我正在尝试创建 Starter Pack 安装程序,并且需要安装 NPM
依赖项。我应该在以下位置创建一个 json
文件: /Users/matteomattiussi/Documents/Udemy/Bootstrap/bs4projects/bs4starter
但我不知道该怎么做,因为我总是在以下位置获取 json 文件:
/Users/matteomattiussi/package.json
有人可以帮我吗?
最佳答案
要在 /Users/matteomattiussi/Documents/Udemy/Bootstrap/bs4projects/bs4starter
中创建 package.json
文件(如果该目录已存在并且您已安装 npm
):
cd /Users/matteomattiussi/Documents/Udemy/Bootstrap/bs4projects/bs4starter
npm init
This will initiate a command line questionnaire that will conclude with the creation of a package.json in the directory you initiated the command.
关于json - 使用终端在特定目录中创建 json 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47701185/