第一次尝试安装Grunt时,并遵循很多指南,我似乎没有在我的项目中获得Gruntfile.js。任何想法我可能做错了什么?Npm没有创建Gruntfile.js
macbookpro:Noemptytags $ sudo npm install grunt --save-dev
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
[email protected] node_modules/grunt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])
它创造node_modules文件夹,但没有Gruntfile.js
任何有识之士将不胜感激!
感谢您的信息。 – 2014-09-06 15:43:20
我真的很讨厌使用命令行,现在看来我必须一直这样做。我不知道为什么'开始'安装假设你知道每一步的方式。我宁愿命令的列表,像 - NPM安装-g咕噜-CLI - 去项目 - NPM初始化 - NPM安装 - NPM安装咕噜--save-dev的 - NPM安装咕噜-INIT -g - clone $ git clone https://github.com/gruntjs/grunt-init-gruntfile.git〜/ .grunt-init/gruntfile - grunt-init gruntfile – 2014-09-06 16:08:25
如果你讨厌使用命令行,为什么选择grunt ???使用grunt-init只是一个让你更容易的选择。如果您不喜欢它,请继续在您选择的编辑器中自行创建grunt文件!不应该难以创建新的JavaScript文件。当涉及到配置任务时,您必须对其进行编辑,并且您可以决定要使用哪些任务...编辑:而且grunt-docs非常适合如何创建新的grunt文件,配置任务等等! – hereandnow78 2014-09-06 18:58:45