浏览代码

use postinstall script instead of Procfile

https://docs.npmjs.com/misc/scripts
jomo 10 年之前
父节点
当前提交
5f0a3dcb63
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      Procfile
  2. 1 0
      package.json

+ 1 - 1
Procfile

@@ -1 +1 @@
-web: cp "modules/config.example.js" "modules/config.js" && npm start
+web: npm start

+ 1 - 0
package.json

@@ -21,6 +21,7 @@
     "avatar"
     "avatar"
   ],
   ],
   "scripts": {
   "scripts": {
+    "postinstall": "cp 'modules/config.example.js' 'modules/config.js'",
     "start": "node bin/www.js",
     "start": "node bin/www.js",
     "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
     "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
   },
   },