From 449a813ab603167df9d92932c231c52d453a9a3b Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Wed, 12 Apr 2017 20:46:02 -0400 Subject: [PATCH] Now minifies static files with each nodemon restart --- nodemon.json | 3 +++ package.json | 2 +- static/css/base.css | 16 ++++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/nodemon.json b/nodemon.json index d730a0c..e0ecd7d 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,4 +1,7 @@ { "verbose": true, "ext": "html, js, json, css", + "events": { + "restart": "npm run minify" + } } \ No newline at end of file diff --git a/package.json b/package.json index 3dd5d50..a00ec09 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "scripts": { "test": "mocha test.js", "start": "node server.js", - "nodemon": "nodemon server.js", + "nodemon": "nodemon --ignore 'static/**/*.min.*' server.js", "minify": "minify --template .{{filename}}.min.{{ext}} --clean static", "update": "sudo n stable && sudo npm update --save && sudo npm prune" }, diff --git a/static/css/base.css b/static/css/base.css index 1c7d1e5..d378a54 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -45,7 +45,7 @@ h2 { line-height: 36px; } h3 { font-size: 28px; } h4 { font-size: 20px; } -p { +p { margin-top: 0; margin-bottom: 10vh; } @@ -112,7 +112,7 @@ main { left: 0px; right: 0px; bottom: 0px; - overflow-y: auto; + overflow-y: auto; } .container { padding-right: 5%; @@ -141,15 +141,15 @@ section { border: 1px solid #666; border-radius: .5vw; } .btn:not(.disabled) { - -moz-box-shadow: + -moz-box-shadow: inset .11vw .18vw .52vw rgba(255,255,255,.2), inset -.11vw -.18vw .52vw rgba(0,0,0,.4), .11vw .18vw .52vw #000; - -webkit-box-shadow: + -webkit-box-shadow: inset .11vw .18vw .52vw rgba(255,255,255,.2), inset -.11vw -.18vw .52vw rgba(0,0,0,.4), .18vw .18vw .36vw #000; - box-shadow: + box-shadow: inset .11vw .18vw .52vw rgba(255,255,255,.2), inset -.11vw -.18vw .52vw rgba(0,0,0,.4), .18vw .18vw .36vw #000; @@ -157,13 +157,13 @@ section { text-decoration: none; background: rgba(255,255,255,0.2); } .btn:active:not(.disabled) { - -moz-box-shadow: + -moz-box-shadow: inset .11vw .18vw .52vw rgba(0,0,0,.4), inset -.11vw -.18vw .52vw rgba(255,255,255,.2); - -webkit-box-shadow: + -webkit-box-shadow: inset .11vw .18vw .52vw rgba(0,0,0,.4), inset -.11vw -.18vw .52vw rgba(255,255,255,.2); - box-shadow: + box-shadow: inset .11vw .18vw .52vw rgba(0,0,0,.4), inset -.11vw -.18vw .52vw rgba(255,255,255,.2); } .btn:focus:not(.disabled){