I'm trying very hard to understand the Node ecosystem and how npm and its packages work together and I find it very odd that npm init
initializes a "grunt project" and adds a package.json file to your directory.
Since the node package manager manages many different "packages", I would expect something more like npm grunt init
Can anyone fill me in on what's going on here and what makes grunt so special that it gets to be the main npm init
command?
** IMPORTANT NOTE ** after studying and understanding all this a lot better, I would strongly recommend you use neither Grunt NOR Gulp and instead take out the middle man and use npm scripts for your front-end build needs. See this great article by Cory House for more information
All npm init
does is give you prompts (see below) to create a package.json, there's nothing grunt-related that comes with it.
name: (test)
version: (0.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (BSD)
Grunt can certainly (and probably should be) installed with npm but it's definitely not part of initializing your package.json.
You can read more about package.json here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.