Skip to content

Instantly share code, notes, and snippets.

@frankyonnetti
Last active March 3, 2025 22:03
Show Gist options
  • Select an option

  • Save frankyonnetti/23d20f21a78f18c5c40056724d67c3eb to your computer and use it in GitHub Desktop.

Select an option

Save frankyonnetti/23d20f21a78f18c5c40056724d67c3eb to your computer and use it in GitHub Desktop.
NPM scripts #npm #scss #javascript
# https://github.com/browserslist/browserslist
>= 1%
last 2 major version
not dead
Chrome >= 45
Firefox >= 38
Edge >= 12
Explorer >= 10
iOS >= 9
Safari >= 9
Android >= 4.4
Opera >= 30
/*
* Browser-sync config file
* ------------------------
*
* Duplicate file and rename it 'browsersync.js'.
*
* Change or add vaules below as needed.
* http://www.browsersync.io/docs/options/
*
*/
module.exports = {
ui: false,
proxy: 'http://example.test',
port: 3110,
ghostMode: false,
open: false,
browser: 'google chrome',
notify: true
}
{
"name": "project-name",
"version": "1.0.0",
"description": "Project description goes here...",
"author": "DesignHammer, LLC",
"license": "GPL-2.0 AND MIT",
"repository": {
"type": "git",
"url": "https://bitbucket.org/"
},
"scripts": {
"browsersync": "browser-sync start reload --config './browsersync.js' -f './css/styles.css, ./js/min/scripts.js, ./js/min/scripts_core.js'",
"scss": "sass --stop-on-error --style=expanded ./scss:/tmp",
"autoprefixer": "postcss /tmp/styles.css --use autoprefixer --map -d ./css",
"uglify": "mkdirp ./js/min -p && uglifyjs ./js/*.js -m -c -o ./js/min/*.js --source-map",
"build:css": "run-s scss autoprefixer",
"build:js": "run-s uglify",
"build": "run-s build:*",
"watch:css": "onchange './scss/**/*.scss' -- run-s build:css",
"watch:js": "onchange './js/*.js' -- run-s build:js",
"watch": "run-p browsersync watch:*"
},
"keywords": [
"css",
"dart-sass",
"sass",
"javascript",
"minify",
"lint"
],
"devDependencies": {
"autoprefixer": "^10.2.5",
"browser-sync": "^2.26.14",
"dart-sass": "^1.25.0",
"mkdirp": "^1.0.4",
"npm-run-all": "^4.1.5",
"onchange": "^7.1.0",
"postcss": "^8.2.15",
"postcss-cli": "^8.3.1",
"standard": "^16.0.3",
"stylelint": "^13.13.1",
"stylelint-config-sass-guidelines": "^8.0.0",
"stylelint-config-standard": "^22.0.0",
"uglify-js": "^3.13.6"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment