-- npm 은 실행 중인 스크립트 이름을 npm_lifecycle_event 로 넘긴다
stage :: String -> Maybe String
stage = stripPrefix "dev:" -- ${npm_lifecycle_event#dev:} — sh 로 돌아서 POSIX # 만 (bash 의 // 는 안 된다)
stage "dev:hello" == Just "hello"
-- 이렇게 하기보다 스크립트를 따로 쓰는 게 낫다
-- npm 은 실행 중인 스크립트 이름을 npm_lifecycle_event 로 넘긴다
stage :: String -> Maybe String
stage = stripPrefix "dev:" -- ${npm_lifecycle_event#dev:} — sh 로 돌아서 POSIX # 만 (bash 의 // 는 안 된다)
stage "dev:hello" == Just "hello"
-- 이렇게 하기보다 스크립트를 따로 쓰는 게 낫다