mirror of https://github.com/nodejs/node.git
29 lines
1.4 KiB
HTML
29 lines
1.4 KiB
HTML
<h1><a href="../cli/npm-init.html">npm-init</a></h1> <p>Interactively create a package.json file</p>
|
|
<h2 id="synopsis">SYNOPSIS</h2>
|
|
<pre><code>npm init [-f|--force|-y|--yes]
|
|
</code></pre><h2 id="description">DESCRIPTION</h2>
|
|
<p>This will ask you a bunch of questions, and then write a package.json for you.</p>
|
|
<p>It attempts to make reasonable guesses about what you want things to be set to,
|
|
and then writes a package.json file with the options you've selected.</p>
|
|
<p>If you already have a package.json file, it'll read that first, and default to
|
|
the options in there.</p>
|
|
<p>It is strictly additive, so it does not delete options from your package.json
|
|
without a really good reason to do so.</p>
|
|
<p>If you invoke it with <code>-f</code>, <code>--force</code>, <code>-y</code>, or <code>--yes</code>, it will use only
|
|
defaults and not prompt you for any options.</p>
|
|
<h2 id="configuration">CONFIGURATION</h2>
|
|
<h3 id="scope">scope</h3>
|
|
<ul>
|
|
<li>Default: none</li>
|
|
<li>Type: String</li>
|
|
</ul>
|
|
<p>The scope under which the new module should be created.</p>
|
|
<h2 id="see-also">SEE ALSO</h2>
|
|
<ul>
|
|
<li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li>
|
|
<li><a href="../files/package.json.html">package.json(5)</a></li>
|
|
<li><a href="../cli/npm-version.html">npm-version(1)</a></li>
|
|
<li><a href="../misc/npm-scope.html">npm-scope(7)</a></li>
|
|
</ul>
|
|
|