Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Last active February 12, 2017 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelmokos/3cbacb08eb5104fa3a2f512c7f21010a to your computer and use it in GitHub Desktop.
Save marcelmokos/3cbacb08eb5104fa3a2f512c7f21010a to your computer and use it in GitHub Desktop.
#!/bin/sh
packagejson=$(cat package.json)
addtopackagejson=$(echo '{
"author": "Marcel Mokoš <https://github.com/marcelmokos>",
"pre-commit": [
"lint:pre-commit"
],
"scripts": {
"test": "jest --env=jsdom",
"test:coverage": "yarn test -- --coverage",
"flow": "flow",
"lint": "eslint \"/**/*.js\" --cache",
"lint:fix": "yarn run lint -- --fix",
"lint:pre-commit": "yarn run lint -- --fix"
}}')
echo "$addtopackagejson
$packagejson" | json --deep-merge > package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment