Skip to content

Instantly share code, notes, and snippets.

@bhrott
Created May 8, 2018 19:11
Show Gist options
  • Save bhrott/d393df3b3afc1d6cd13be5815138e248 to your computer and use it in GitHub Desktop.
Save bhrott/d393df3b3afc1d6cd13be5815138e248 to your computer and use it in GitHub Desktop.
Base Pack Parcel + Jest
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
# parce
dist
.cache

Preparation

  • Copy the package.json file to your folder app root.
  • Copy the .gitignore file to your folder app root.
  • In terminal, navigate to your folder app root and run npm install.

Run application

  • In terminal, navigate to your folder app root and run npm start.

Run tests

  • In terminal, navigate to your folder app root and run npm test.
{
"name": "my-app",
"scripts": {
"start": "parcel index.html",
"test": "jest"
},
"dependencies": {},
"devDependencies": {
"jest": "^22.4.3",
"parcel": "^1.8.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment