Skip to content

Instantly share code, notes, and snippets.

@kra3
Created February 8, 2018 10:59
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 kra3/123a2e6e7f66e34efa12f1dff8c8e583 to your computer and use it in GitHub Desktop.
Save kra3/123a2e6e7f66e34efa12f1dff8c8e583 to your computer and use it in GitHub Desktop.
useful scripts section for package.json (npm/webpack/babel/storybook/esdoc/coverage/eslint)
{
"scripts": {
"---Dev": "---",
"storybook": "start-storybook -p 9001 -c .storybook",
"dev:start": "npm run storybook",
"start": "npm run dev:start",
"---Build": "---",
"clean": "echo 'Cleaning lib folder...\n' && rm -rf ./lib",
"build": "npm run clean && echo 'Building...\n' && babel src --out-dir lib --copy-files --ignore **/__tests__",
"watch": "babel src -w -s inline --out-dir lib --copy-files --ignore **/__tests__",
"-----Tests": "-----",
"lint": "eslint src --ext=jsx --ext=js",
"test": "NODE_ENV=development jest",
"tests": "npm run test",
"test:single": "npm run test",
"test:coverage": "npm run test -- --coverage",
"-----Docs": "-----",
"docs": "npm run docs:storybook",
"docs:es": "esdoc -c .esdocrc && open ./esdoc/index.html",
"docs:storybook": "build-storybook -o ./docs/",
"view:coverage": "npm run test-coverage && open ./coverage/lcov-report/index.html",
"---Git Hooks": "---",
"precommit": "npm run lint:diff",
"prepublish": "npm run build",
"prepush": "npm run lint && npm run test"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment