Skip to content

Instantly share code, notes, and snippets.

@idettman
Last active February 26, 2020 09:03
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 idettman/9ec139726de648073a3f8421e18be02b to your computer and use it in GitHub Desktop.
Save idettman/9ec139726de648073a3f8421e18be02b to your computer and use it in GitHub Desktop.
Example .editorconfig, .eslintrc, package.json, and .gitignore
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
{
"extends": "eslint:recommended",
"rules": {
"no-console": 0,
"no-unused-vars": 0
},
"env": {
"browser": true,
"jquery": false
}
}
.DS_Store
node_modules
{
"name": "gulp-starter",
"dependencies": {},
"devDependencies": {
"browser-sync": "^2.11.2",
"gulp": "^3.9.0",
"gulp-eslint": "^1.1.1",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.0.1"
}
}
{
"name": "example-scripts",
"version": "0.0.1",
"dependencies": {},
"devDependencies": {
"autoprefixer": "^6.7.7",
"browser-sync": "^2.18.8",
"cssnano": "^3.10.0",
"eslint": "^3.19.0",
"imagemin-cli": "^3.0.0",
"mkdirp": "^0.5.1",
"node-sass": "^4.5.2",
"parallelshell": "^2.0.0",
"postcss-cli": "^2.6.0",
"postcss-csscomb": "^1.0.2",
"source-map-concat-cli": "^1.0.0",
"uglify-js": "^2.8.21",
"watch": "^1.0.2"
},
"scripts": {
"sass": "node-sass assets/_sass --output assets/css; exit 0",
"postcss": "postcss --config config.postcss.json --map inline --dir assets/css assets/css/*.css",
"concat": "source-map-concat assets/_js/app.js --output assets/js/app.js",
"eslint": "eslint --config '.eslintrc' assets/_js/**/*.js; exit 0",
"uglify": "uglifyjs --compress --mangle --output dist/assets/js/app.js assets/js/app.js",
"imagemin": "imagemin assets/images/* --out-dir dist/assets/images; exit 0",
"browsersync": "browser-sync start --config bs-config.js",
"watch": "yarn run watch:parallel",
"watch:parallel": "parallelshell 'yarn run browsersync' 'yarn run watch:sass' 'yarn run watch:js'",
"watch:sass": "watch --interval 0.1 'yarn run sass && yarn run postcss' assets/_sass",
"watch:js": "watch --interval 0.1 'yarn run eslint && yarn run concat' assets/_js",
"css": "yarn run sass && yarn run postcss",
"js": "yarn run eslint && yarn run concat",
"build": "parallelshell 'yarn run css' 'yarn run js'",
"dist": "yarn run dist:mkdirp && parallelshell 'yarn run dist:css' 'yarn run dist:js'",
"dist:mkdirp": "mkdirp dist/assets/js",
"dist:postcss": "postcss --config config.postcss.dist.json --no-map --dir dist/assets/css assets/css/*.css",
"dist:css": "yarn run dist:postcss",
"dist:js": "yarn run uglify",
"dist:images": "yarn run imagemin",
"dist:all": "parallelshell 'yarn run dist' 'yarn run dist:images'"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment