ユーザ用ツール

サイト用ツール


javascript:nodejs

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
javascript:nodejs [2018/12/19 09:30] – [コマンド] takajavascript:nodejs [2018/12/19 09:44] (現在) – [コマンド] taka
行 20: 行 20:
 === 初期化 === === 初期化 ===
  
-<sxh bash> +初期化することでカレントディレクトリにpackage.jsonを作成することができる。\\ 
-npm init +package.jsonはインストールする・したパッケージを管理するためのもの。 
-</sxh>+ 
 +  $ npm init 
 + 
 +npm initを実行すると対話型で以下項目を質問されるが、すべてEnterキーでスキップすることもできる。 
 + 
 +  package name: (npmtest)  
 +  version: (1.0.0)  
 +  description:  
 +  entry point: (index.js)  
 +  test command:  
 +  git repository:  
 +  keywords:  
 +  author:  
 +  license: (ISC) 
 + 
 +最後にpackage.jsonをこの内容で書き込んでいいかと聞かれるのでyesとタイプする。 
 + 
 +  About to write to /Users/koketsu/Desktop/npmtest/package.json: 
 +   
 +  { 
 +    "name": "npmtest", 
 +    "version": "1.0.0", 
 +    "description": "", 
 +    "main": "index.js", 
 +    "scripts":
 +      "test": "echo \"Error: no test specified\" && exit 1" 
 +    }, 
 +    "author": "", 
 +    "license": "ISC" 
 +  } 
 +   
 +  Is this OK? (yes) 
javascript/nodejs.1545179405.txt.gz · 最終更新: 2018/12/19 09:30 by taka