==npm==
[[Node.js]]
*http://qiita.com/hashrock/items/15f4a4961183cfbb2658
*とりあえず全部エンターキーを押しても問題ありません。
*ディレクトリ直下にpackage.jsonが作成されます。
> > npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
and exactly what they do.
Use `npm install <<pkg> > --save` afterwards to install a package and
save it as a dependency in the package.json file.
*ライブラリ同士の依存も自動で解決されます。
> > npm install -g browserify<<blockquote>>-g オプションはパッケージのグローバルインストールを意味します。browserify はいつでも使う便利ツールなのでシステム全体にインストールします。開発中のプロジェクト固有のパッケージをインストールするときは、-g オプションを外せば、プロジェクトフォルダの node_module フォルダ配下にダウンロードされます。<</blockquote>>
*browserifyを使うと、下記のように書くことができる
<<script src="assets/js/jquery.min.js"><></script>>
を
var $ = require("jquery");
=====npm run =====
*タスクの一覧
> > npm run
Lifecycle scripts included in commonjs_lesson:
test
echo "Error: no test specified" && exit 1
=====npm run タスク=====
> > npm run test
> > commonjs_lesson@1.0.0 test C:\workspaces\vscode\commonjs_lesson > > echo "Error: no test specified" && exit 1
"Error: no test specified"