Skip to content

Instantly share code, notes, and snippets.

@edoves
Created September 9, 2022 09:29
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 edoves/cc48de480076124b2a77f376653d94bd to your computer and use it in GitHub Desktop.
Save edoves/cc48de480076124b2a77f376653d94bd to your computer and use it in GitHub Desktop.
static website setup
{
"name": "project",
"version": "0.1.0",
"description": "SASS compile|autoprefix|minimize and live-reload dev server using Browsersync for static HTML",
"main": "public/index.html",
"author": "5t3ph",
"scripts": {
"build:sass": "sass --no-source-map src/sass:public/css",
"copy:html": "copyfiles -u 1 ./src/*.html public",
"copy:js": "copyfiles -u 1 ./src/**/*.js public",
"copy": "npm-run-all --parallel copy:*",
"watch:html": "onchange \"src/*.html\" -- npm run copy:html",
"watch:js": "onchange \"src/**/*.js\" -- npm run copy:js",
"watch:sass": "sass --no-source-map --watch src/sass:public/css",
"watch": "npm-run-all --parallel watch:*",
"serve": "browser-sync start --server public --files public",
"start": "npm-run-all copy --parallel watch serve",
"build": "npm-run-all copy:html build:*",
"postbuild": "postcss public/css/*.css -u autoprefixer cssnano -r --no-map"
},
"dependencies": {
"autoprefixer": "^10.4.2",
"browser-sync": "^2.27.7",
"copyfiles": "^2.4.1",
"cssnano": "^5.0.17",
"npm-run-all": "^4.1.5",
"onchange": "^7.1.0",
"postcss-cli": "^9.1.0",
"sass": "^1.49.8"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment