Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
5.2 KiB

  1. <!doctype html>
  2. <html>
  3. <title>npm-init</title>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" type="text/css" href="../../static/style.css">
  6. <link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-init.html">
  7. <script async=true src="../../static/toc.js"></script>
  8. <body>
  9. <div id="wrapper">
  10. <h1><a href="../cli/npm-init.html">npm-init</a></h1> <p>create a package.json file</p>
  11. <h2 id="synopsis">SYNOPSIS</h2>
  12. <pre><code>npm init [--force|-f|--yes|-y|--scope]
  13. npm init &lt;@scope&gt; (same as `npx &lt;@scope&gt;/create`)
  14. npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npx [&lt;@scope&gt;/]create-&lt;name&gt;`)</code></pre><h2 id="examples">EXAMPLES</h2>
  15. <p>Create a new React-based project using <a href="https://npm.im/create-react-app"><code>create-react-app</code></a>:</p>
  16. <pre><code>$ npm init react-app ./my-react-app</code></pre><p>Create a new <code>esm</code>-compatible package using <a href="https://npm.im/create-esm"><code>create-esm</code></a>:</p>
  17. <pre><code>$ mkdir my-esm-lib &amp;&amp; cd my-esm-lib
  18. $ npm init esm --yes</code></pre><p>Generate a plain old package.json using legacy init:</p>
  19. <pre><code>$ mkdir my-npm-pkg &amp;&amp; cd my-npm-pkg
  20. $ git init
  21. $ npm init</code></pre><p>Generate it without having it ask any questions:</p>
  22. <pre><code>$ npm init -y</code></pre><h2 id="description">DESCRIPTION</h2>
  23. <p><code>npm init &lt;initializer&gt;</code> can be used to set up a new or existing npm package.</p>
  24. <p><code>initializer</code> in this case is an npm package named <code>create-&lt;initializer&gt;</code>, which
  25. will be installed by <a href="https://npm.im/npx"><code><a href="../cli/npx.html">npx(1)</a></code></a>, and then have its main bin
  26. executed -- presumably creating or updating <code>package.json</code> and running any other
  27. initialization-related operations.</p>
  28. <p>The init command is transformed to a corresponding <code>npx</code> operation as follows:</p>
  29. <ul>
  30. <li><code>npm init foo</code> -&gt; <code>npx create-foo</code></li>
  31. <li><code>npm init @usr/foo</code> -&gt; <code>npx @usr/create-foo</code></li>
  32. <li><code>npm init @usr</code> -&gt; <code>npx @usr/create</code></li>
  33. </ul>
  34. <p>Any additional options will be passed directly to the command, so <code>npm init foo
  35. --hello</code> will map to <code>npx create-foo --hello</code>.</p>
  36. <p>If the initializer is omitted (by just calling <code>npm init</code>), init will fall back
  37. to legacy init behavior. It will ask you a bunch of questions, and then write a
  38. package.json for you. It will attempt to make reasonable guesses based on
  39. existing fields, dependencies, and options selected. It is strictly additive, so
  40. it will keep any fields and values that were already set. You can also use
  41. <code>-y</code>/<code>--yes</code> to skip the questionnaire altogether. If you pass <code>--scope</code>, it
  42. will create a scoped package.</p>
  43. <h2 id="see-also">SEE ALSO</h2>
  44. <ul>
  45. <li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li>
  46. <li><a href="../files/package.json.html">package.json(5)</a></li>
  47. <li><a href="../cli/npm-version.html">npm-version(1)</a></li>
  48. <li><a href="../misc/npm-scope.html">npm-scope(7)</a></li>
  49. </ul>
  50. </div>
  51. <table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
  52. <tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
  53. <tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
  54. <tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
  55. <tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
  56. <tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
  57. <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
  58. <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
  59. </table>
  60. <p id="footer">npm-init &mdash; npm@6.4.1</p>