Skip to content

Instantly share code, notes, and snippets.

@m0wh
Last active August 2, 2019 08:26
Show Gist options
  • Save m0wh/e5cdf9a81bd2ea5eeaf10b15f3dc23d5 to your computer and use it in GitHub Desktop.
Save m0wh/e5cdf9a81bd2ea5eeaf10b15f3dc23d5 to your computer and use it in GitHub Desktop.
Front-end basic boilerplate: Parcel + ESlint + GitHub Pages + Sass — Installation: git clone https://gist.github.com/e5cdf9a81bd2ea5eeaf10b15f3dc23d5.git myproject && cd myproject && yarn letsgo
module.exports = {
'env': {
'browser': true,
'es6': true
},
'extends': 'standard',
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module'
},
'rules': {
}
}
node_modules/
.DS_Store
package-lock.json
coverage
.nyc_output
.cache
dist
lib
.vscode/
.idea/
*.min.js
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
tmp
#!/usr/bin/env sh
set -e
yarn build
cd dist
# if deploying to a custom domain
# echo 'domain.com' > CNAME
git init
git add -A
git commit -m 'Update' --allow-empty
git push -f origin master
# you can replace 'origin' by the repo you want to commit to (e.g. git push -f git@github.com:m0wh/m0wh.github.io.git master:master)
cd -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Title</title>
<link rel="stylesheet" href="./src/style.scss">
</head>
<body>
<script src="./src/index.js"></script>
</body>
</html>
{
"name": "title",
"version": "1.0.0",
"description": "A quick boilerplate for vanilla projects",
"main": "index.html",
"scripts": {
"letsgo": "mkdir src && echo \"import './style.scss'\" > src/index.js && touch src/style.scss && yarn",
"start": "parcel index.html --open",
"build": "parcel build index.html --public-url .",
"predeploy": "yarn build",
"deploy": "./deploy.sh"
},
"author": "Malo Widerspach <malo.dewiderspach@gmail.com>",
"license": "MIT",
"private": false,
"devDependencies": {
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^4.0.0",
"parcel-bundler": "^1.12.3",
"parcel-plugin-eslint": "^1.0.7",
"sass": "^1.20.1"
}
}
@m0wh
Copy link
Author

m0wh commented Jun 7, 2019

Useful tip: Add alias frontend='git clone https://gist.github.com/e5cdf9a81bd2ea5eeaf10b15f3dc23d5.git . && yarn letsgo' to your .bash_profile, so when you type "frontend" on command line, everything is set-up quickly 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment