Commits

David Chambers committed db67060

Cakefile: add a task for generating the style sheet from the Sass file

Comments (0)

Files changed (4)

+^hashify[.]css$
 fs = require 'fs'
 path = require 'path'
+{exec} = require 'child_process'
 
 CoffeeScript = require 'coffee-script'
 express = require 'express'
   'src/hashify.coffee'
 ]
 
+option '-d', '--development',   'do not minify style sheet'
 option null, '--ga-key [KEY]',  'set the Google Analytics key'
 option '-o', '--output [FILE]', 'write output to <file> instead of stdout'
 
   if options.output? then fs.writeFileSync options.output, data, 'utf8'
   else console.log data
 
+task 'build:styles', 'generate style sheet from Sass file', (options) ->
+  args = ['--sass-dir .', '--css-dir .']
+  if options.development
+    args.push '--no-line-comments'
+  else
+    args.push '--environment production'
+
+  exec "compass compile #{ args.join ' ' }", (err, stdout) ->
+    console.log stdout.trim()
+
 task 'server', 'start the development server', ->
   serve = (fn) -> (req, res) ->
     filename = fn req
 
     hg pull --update
     cake --ga-key UA-22176121-1 --output ./concat.min.js build:scripts
+    cake build:styles

hashify.css

-body {
-  margin: 0;
-  min-width: 900px;
-  min-height: 600px;
-  padding: 0;
-  font: 24px/32px "Helvetica Neue", Helvetica, sans-serif;
-}
-body.dragging {
-  cursor: ew-resize;
-  -webkit-user-select: none;
-  -moz-user-select: none;
-  user-select: none;
-}
-body.dragging ::-moz-selection {
-  background: none;
-}
-
-#sidebar {
-  position: fixed;
-  left: 0;
-  width: 480px;
-  height: 100%;
-  background: #eeeeee;
-}
-
-#editor {
-  position: absolute;
-  left: 31px;
-  right: 31px;
-  height: 100%;
-  padding: 0;
-}
-
-#markdown {
-  position: absolute;
-  margin: 81px 0 0 -7px;
-  width: 100%;
-  height: 67.5%;
-  border: 1px solid #dddddd;
-  background: #f7f7f7 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAABCAIAAACOvmNtAAAAD0lEQVQI12N49+7dJ6IBANCxKn9o9CjfAAAAAElFTkSuQmCC') repeat-y 100%;
-  font: 12px/1.25 Monaco, monospace;
-  padding: 6px;
-  resize: none;
-}
-#markdown:focus {
-  margin: 80px 0 0 -8px;
-  border: 2px solid #0088ff;
-  outline: none;
-}
-
-.hashify-editor-toolbar {
-  position: relative;
-  left: 0;
-  top: 45px;
-  margin: 0 auto;
-  width: 288px;
-}
-
-#counter {
-  position: absolute;
-  right: -8px;
-  top: 48px;
-  width: 60px;
-  text-align: right;
-  font-size: 18px;
-  line-height: 1;
-  color: #bbbbbb;
-  text-shadow: 0 1px 0 white;
-}
-#counter.caution {
-  color: #ff6600;
-}
-#counter.danger {
-  color: #cc0000;
-}
-
-#wrapper,
-#shorten {
-  position: absolute;
-  left: 0;
-  right: 0;
-  height: 20px;
-  border-bottom: 1px solid #dddddd;
-  background: #e7e7e7;
-  padding: 6px 0;
-}
-
-#wrapper.loading,
-#mask {
-  background: #e7e7e7 url('data:image/gif;base64,R0lGODlhEAAQAPdFAJSUlObm56Skpbm5utLS0+Li49HR0s/P0K+vsNjY2a6ur6CgoaurrOXl5uHh4rCwsby8vLS0teDg4cLCw9DQ0dvb3Kenp5iYmWxsbExMTMnJysXFxeTk5dPT1MPDxMrKy93d3rGxsaqqq+Pj5CQkJNnZ2pubnIyMjLq6u6OjpIGBgZ2dnd/f4Jqam6ysrZeXmL29vp+foM/Pz7Kys319ft7e356enqioqMTExaGhoqWlpsDAwbKysszMzampqklJSiAgILi4uZWVlbW1tsvLzOfn6MbGx3l5eoSEhbe3uNra21RUVYyMjZWVlpycnFJSUmNjY4KCgnV1dRUVFS4uLhoaGlZWVoeHiM7Oz62tromJiZCQkXd3d6ioqdfX2HBwcYaGh1NTVAUFBYuLi8fHyJaWl6amptXV1jY2N5+fn2lpam9vbwAAAGRkZHNzdERERDAwMGZmZyIiImdnaH5+fry8vZmZmnp6e8XFxsjIydzc3S0tLW9vcNnZ2VhYWFFRUV1dXmBgYLOztCYmJnt7fD8/P8HBwnh4eA4ODoqKipOTk2JiYkpKS0ZGRoCAgCMjI0dHR0tLTEhISDs7OyUlJXJyc9bW109PT3Z2dmVlZVVVVs3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AMGiS4CCWYygAlDkSoIINDwg/AvCxRWABAAEBACH5BAUAAAMALAAAAwALAA0AAAhrAAcM+TAAxoCDCAcsgSaqQiAeCQcQUGHMmZ4REQ9GoJPxlTQoGKJlbFYoFKwkGREaUZASRJlLxwpkdCMplpcFCpQoIXLwGYQBH/hEyCLgAACELF4hCcBgxYAZCA/g2jAAgYkANVKi8BFgQEAAIfkEBQAAAwAsAAAAAAgADwAACGgABwgcwGHgQDJ7YBgcoMRYtYEeNg0QRC3GggGRfpmokWHUhgEeSD2CVaOAwQevBgpZ5YmWkYGeSAVS42HhABl1AgyU4MPNKoMnRgkowWMHiAHT8AwwAGBDkIEFcqQIwGNgBxMHBjwICAA7') no-repeat 50%;
-  z-index: 1;
-}
-
-#wrapper.loading > #tweet,
-#wrapper.loading > #shorturl,
-#wrapper.loading > #qrcode {
-  display: none;
-}
-
-#tweet {
-  position: relative;
-  left: -108px;
-  float: left;
-  margin: 0 -101px 0 50%;
-  width: 55px;
-  height: 20px;
-  border: none;
-}
-
-#wrapper,
-#shorten,
-#shorturl {
-  display: block;
-  font-size: 14px;
-  line-height: 1;
-}
-
-#wrapper,
-#shorten {
-  text-align: center;
-  color: #999999;
-  cursor: default;
-}
-
-#shorten {
-  height: 14px;
-  padding: 9px 0;
-}
-#shorten:focus, #shorten:hover {
-  border-bottom-color: #0088ff;
-  background: #0088ff;
-  color: white;
-}
-
-#shorturl {
-  position: relative;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  -ms-border-radius: 3px;
-  -o-border-radius: 3px;
-  border-radius: 3px;
-  padding: 2px 4px;
-  color: #336699;
-}
-#shorturl:before {
-  position: absolute;
-  left: -5px;
-  top: 5px;
-  width: 5px;
-  height: 9px;
-  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAP0lEQVQY02P4//8/AzI+c/fdf3Sx0FV3MRWhKwQpQlGIpOgfuiKQMDZF/9AVgRViUfQPXRFpJpLkRpJ8TSgcARh2JIwJY6/zAAAAAElFTkSuQmCC');
-  content: "";
-}
-#shorturl:focus:before, #shorturl:hover:before {
-  background-position: -5px;
-}
-
-#shorturl,
-#qrcode {
-  float: left;
-  border: 1px solid #ccddee;
-  background: white;
-}
-#shorturl:focus, #shorturl:hover,
-#qrcode:focus,
-#qrcode:hover {
-  border-color: #55aadd;
-  background-color: #ddeeff;
-}
-
-#qrcode {
-  display: block;
-  margin-left: 4px;
-  width: 18px;
-  height: 18px;
-  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAWElEQVQ4y2P8//8/AzUAI9UNMkmfhctERiiNVf7MzDRGDINgglA+TDOyQYxANQxIav7jNAjJZYzYDIK5DKaWtgYhaWJA04zOhsvjMojywB5NR6PpaFilIwCy363dZ3YWXgAAAABJRU5ErkJggg==');
-  text-indent: -9999px;
-}
-
-#credits {
-  position: absolute;
-  left: 0;
-  right: 0;
-  top: 67.5%;
-  margin: 95px 0 0;
-  padding: 18px 24px;
-  font: italic 12px/1.5 Georgia, serif;
-  color: #666666;
-}
-#credits > h4 {
-  display: inline;
-  font: inherit;
-}
-#credits > h4:after {
-  content: ":";
-}
-#credits > ul {
-  display: inline;
-  list-style: none;
-}
-#credits > ul > li {
-  display: inline;
-}
-#credits > ul > li:after {
-  content: ",";
-}
-#credits > ul > li:last-child:after {
-  content: ".";
-}
-#credits > p {
-  margin: 6px 0;
-}
-#credits a {
-  text-decoration: underline;
-}
-
-#dragger {
-  position: absolute;
-  right: -4px;
-  top: 0;
-  bottom: 0;
-  width: 2px;
-  border-width: 0 1px;
-  border-style: solid;
-  border-color: #cccccc;
-  background: #dddddd;
-  cursor: ew-resize;
-}
-
-#markup {
-  margin-left: 480px;
-  max-width: 36em;
-  padding: 1em 2em 2em 2.167em;
-}
-#sidebar.concealed + #markup {
-  margin-left: 0;
-}
-#markup a {
-  color: #0000cc;
-}
-#markup a:focus, #markup a:hover {
-  text-decoration: underline;
-}
-#markup img {
-  max-width: 100%;
-}
-#markup h1 + p > time:first-child:only-child {
-  font-style: italic;
-}
-
-#mask,
-#kbd-shortcuts {
-  position: fixed;
-  left: 0;
-  right: 0;
-  top: 0;
-  bottom: 0;
-}
-
-#kbd-shortcuts {
-  display: none;
-  background: #cccccc;
-  background: rgba(0, 0, 0, 0.25);
-}
-#kbd-shortcuts.active {
-  display: block;
-}
-#kbd-shortcuts div {
-  margin: 80px auto 0;
-  width: 528px;
-  border: 2px solid #cccccc;
-  background: white;
-  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
-  -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
-  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
-  padding: 0 24px 12px;
-}
-#kbd-shortcuts h1 {
-  margin: 0 -24px 12px;
-  border-bottom: 2px solid #cccccc;
-  padding: 12px 24px;
-  font-size: 32px;
-  line-height: 1.5;
-}
-#kbd-shortcuts h2 {
-  margin: 4px 0 12px;
-  border-bottom: 2px solid #eeeeee;
-  font-size: 18px;
-}
-#kbd-shortcuts dl {
-  margin: 0;
-  font-size: 18px;
-  line-height: 24px;
-  overflow: auto;
-}
-#kbd-shortcuts dt {
-  float: left;
-}
-#kbd-shortcuts kbd {
-  display: block;
-  float: left;
-  margin: 0 4px 0 0;
-  width: 22px;
-  -webkit-border-radius: 5px;
-  -moz-border-radius: 5px;
-  -ms-border-radius: 5px;
-  -o-border-radius: 5px;
-  border-radius: 5px;
-  border: 1px solid #111111;
-  background: #333333;
-  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #555555), color-stop(100%, #111111));
-  background: -webkit-linear-gradient(#555555, #111111);
-  background: -moz-linear-gradient(#555555, #111111);
-  background: -o-linear-gradient(#555555, #111111);
-  background: -ms-linear-gradient(#555555, #111111);
-  background: linear-gradient(#555555, #111111);
-  text-align: center;
-  font: inherit;
-  line-height: 22px;
-  color: white;
-}
-#kbd-shortcuts dd {
-  float: left;
-  margin: 0 0 12px 4px;
-  width: 232px;
-}
-#kbd-shortcuts dt[data-keys="2"] + dd {
-  width: 204px;
-}
-
-h1 {
-  margin: 24px 0;
-  font-size: 48px;
-  line-height: 1;
-}
-
-h2, h3, h4, h5, h6 {
-  margin: 12px 0;
-  font-size: 24px;
-  line-height: 36px;
-}
-
-h2 {
-  margin-top: 24px;
-  font-size: 36px;
-}
-
-h3 {
-  margin-top: 24px;
-  font-size: 30px;
-}
-
-hr {
-  margin: 18px 0 12px;
-  border: none;
-  border-top: 1px solid #cccccc;
-}
-
-p, ol, ul {
-  margin: 12px 0;
-}
-
-ul {
-  padding: 0;
-  list-style: disc outside;
-}
-
-li ol, li ul {
-  margin: 0;
-}
-li li {
-  margin-left: 32px;
-}
-
-blockquote {
-  margin: 12px 0;
-  font-style: italic;
-  font-family: Georgia, serif;
-  color: #440077;
-}
-blockquote em {
-  font-style: normal;
-}
-
-pre {
-  margin: 24px 0;
-  border: 1px solid #cccccc;
-  padding: 1px;
-  white-space: pre-wrap;
-}
-pre > code {
-  display: block;
-  padding: 12px 18px;
-  font-size: 18px;
-  line-height: 24px;
-}
-
-code {
-  background: #eeeeee;
-  padding: 0 0.25em;
-  line-height: 1;
-}
-
-a {
-  color: inherit;
-  text-decoration: none;
-}
-a:focus, a:hover {
-  color: #333333;
-  outline: none;
-}
-
-@media screen {
-  .kwd, .tag {
-    color: #000088;
-  }
-
-  .atv, .str {
-    color: #008800;
-  }
-
-  .com {
-    color: #880000;
-  }
-
-  .clo, .opn, .pun {
-    color: #666600;
-  }
-
-  .atn, .dec, .typ, .var {
-    color: #660066;
-  }
-
-  .lit {
-    color: #006666;
-  }
-
-  .fun {
-    color: red;
-  }
-}
-@media print {
-  #sidebar {
-    display: none !important;
-  }
-
-  #markup {
-    margin: 0;
-  }
-  #markup a {
-    font-weight: bold;
-    color: inherit;
-  }
-  #markup a:after {
-    content: " [" attr(href) "]";
-    font-weight: normal;
-    font-size: 0.8em;
-  }
-  #markup a[href^="/"]:after {
-    content: " [http://hashify.me" attr(href) "]";
-  }
-  #markup h1, #markup h2, #markup h3, #markup h4, #markup h5, #markup h6 {
-    page-break-after: avoid;
-  }
-  #markup pre {
-    page-break-inside: avoid;
-  }
-}