LoginSignup
1
0

More than 5 years have passed since last update.

どんな npm-scripts が定義されているのか見る

Last updated at Posted at 2015-07-13

今までgrepとかエディタやPAGERでいちいち見ていたけど http://stedolan.github.io/jq/ を使うと楽なことに気付いた

$ jq .scripts package.json
{
  "start": "node server.js",
  "lint": "eslint src gulpfile.babel.js webpack.config.js && csscomb src/components --lint",
  "comb": "csscomb src/components --verbose",
  "test": "eslint src && jest",
  "build": "gulp build",
  "serve": "gulp serve",
  "sync": "gulp sync"
}

と思ったけど npm run を知らなかっただけだったみたい

$ npm run
Lifecycle scripts included in :
  start
    node server.js
  test
    eslint src && jest

available via `npm run-script`:
  lint
    eslint src gulpfile.babel.js webpack.config.js && csscomb src/components --lint
  comb
    csscomb src/components --verbose
  build
    gulp build
  serve
    gulp serve
  sync
    gulp sync
1
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
1
0