LoginSignup
0
0

More than 5 years have passed since last update.

npm install xxx -saveした時のコマンドの動かし方

Last updated at Posted at 2017-04-08

globalにインストールしたくない場合のコマンドの動かし方。

下のようにインストールした場合
npm init
npm install typescript --save
```

これでも動く

./node_modules/typescript/bin/tsc -v(バージョン確認)

けれど、

npm run コマンド

下のようにpackage.jsonに書いて、runコマンドを使うと、npm run tscで実行できてしまう。

package.json
{
  "name": "test",
  "version": "1.0.0",
  "description": "test",
  "main": "index.js",
  "directories": {
    "test": "tests"
  },
  "scripts": {
    "tsc": "tsc"
  },
  "author": "naoki",
  "license": "MIT",
  "devDependencies": {
  }
}

参考
http://qiita.com/Mic-U/items/cd456d6bea72937464f8

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0