package.json 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {
  2. "name": "sails-test",
  3. "private": true,
  4. "version": "0.0.0",
  5. "description": "a Sails application",
  6. "keywords": [],
  7. "dependencies": {
  8. "sails": "^1.0.0-45",
  9. "sails-hook-apianalytics": "^2.0.0",
  10. "sails-hook-organics": "^0.13.0",
  11. "sails-hook-orm": "^2.0.0-16",
  12. "sails-hook-sockets": "^1.4.0",
  13. "connect-redis": "3.2.0",
  14. "socket.io-redis": "5.2.0",
  15. "lodash": "3.10.1",
  16. "async": "2.0.1"
  17. },
  18. "devDependencies": {
  19. "eslint": "4.11.0",
  20. "grunt": "1.0.1",
  21. "sails-hook-grunt": "^2.2.1"
  22. },
  23. "scripts": {
  24. "start": "NODE_ENV=production node app.js",
  25. "test": "npm run lint && npm run custom-tests && echo 'Done.'",
  26. "lint": "node ./node_modules/eslint/bin/eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your code looks good.'",
  27. "custom-tests": "echo \"(No other custom tests yet.)\" && echo",
  28. "deploy": "echo 'Warning: This script assumes that this app can be deployed' && echo 'simply by force-pushing on top of the *deploy* branch. It will also temporarily use a local *predeploy* branch for preparing assets, that it will delete after it finishes. Please make sure there is nothing you care about on either of these two branches!!!' && echo '' && echo '' && echo 'Let us see if you are ready to deploy...' && echo '--' && git status && echo '' && echo '--' && echo 'I hope you are on the master branch and have everything pulled and stuff.' && echo 'Press CTRL+C to cancel.' && echo '(you have five seconds)' && sleep 1 && echo '...4' && sleep 1 && echo '...3' && sleep 1 && echo '...2' && sleep 1 && echo '...1' && sleep 1 && echo '' && echo 'Alright, here we go. No turning back now!' && echo 'Wiping node_modules/ and running npm install...' && rm -rf node_modules && rm -rf package-lock.json && npm install && (git add package-lock.json && git commit -am 'AUTOMATED COMMIT: Did fresh npm install before deploying, and it caused something relevant (probably the package-lock.json file) to change! This commit tracks that change.' || true) && echo 'Deploying as version:' && npm version patch && echo '' && git push origin master && git push --tags && (git branch -D predeploy || true) && git checkout -b predeploy && node node_modules/grunt/bin/grunt buildProd && mv www .www && git add .www && node -e 'sailsrc = JSON.parse(require(\"fs\").readFileSync(\"./.sailsrc\", \"utf8\")); if (sailsrc.paths&&sailsrc.paths.public !== undefined || sailsrc.hooks&&sailsrc.hooks.grunt !== undefined) { throw new Error(\"Cannot complete deployment script: .sailsrc file has conflicting contents! Please throw this midway-complete deployment, away switch back to your original branch, remove the conflicting stuff from .sailsrc, then commit and push that up.\"); } sailsrc.paths = sailsrc.paths || {}; sailsrc.paths.public = \"./.www\"; sailsrc.hooks = sailsrc.hooks || {}; sailsrc.hooks.grunt = false; require(\"fs\").writeFileSync(\"./.sailsrc\", JSON.stringify(sailsrc))' && git commit -am 'AUTOMATED COMMIT: Automatically bundling compiled assets as part of deploy, updating the EJS layout and .sailsrc file accordingly.' && git push origin predeploy && git checkout master && git push origin +predeploy:deploy && git push --tags && git branch -D predeploy && git push origin :predeploy && echo '' && echo '--' && echo 'OK, done. It should be live momentarily.' && echo '(if you get impatient, check the Heroku dashboard for status)'"
  29. },
  30. "main": "app.js",
  31. "repository": {
  32. "type": "git",
  33. "url": "git://github.com/hd/sails-test.git"
  34. },
  35. "author": "hd",
  36. "license": "",
  37. "engines": {
  38. "node": "8"
  39. }
  40. }