Upgrade to Pro — share decks privately, control downloads, hide ads and more …

makeとnpmでプロジェクトをコントロールする

 makeとnpmでプロジェクトをコントロールする

makeとnpmをつかってプロジェクトをなんとかしてる話
#uit_2

More Decks by Taketoshi Aono(青野健利 a.k.a brn)

Other Decks in Programming

Transcript

  1. Agenda •  Why we should stop using gulp or grunt

    •  npm scripts •  Convinient modules •  Dependencies and DLL •  Linting٥Formatting •  Before commit •  Make •  Wrap by Makefile •  Docker
  2. # 直列実行 # command1 => command2 => command3! run-s command1

    command2 command3! ! # 並列実行 # command1 =>! # command2 =>! # command3 =>! run-p command1 command2 command3!
  3. const PKG = require('./package.json');! ! module.exports = {! entry: {!

    "dll": Object.keys(PKG.dependencies);! },! ...! }!
  4. {! ...! "scripts": {! "test": "echo \"Error\" && exit 1",!

    "foo": "echo \"fooo\" && exit 0",! "bar": "echo \"bar\" && exit 0"! },! "pre-commit": [! "foo",! "bar",! "test"! ]! }! } !
  5. WEBPACK = node node_modules/.bin/webpack! ! .PHONY: build install! ! all:

    install build! ! build:! NODE_ENV=production WEBPACK! ! install:! yarn install!