Permalink
Browse files

Completely reworked how the app is compiled/developed.

* no more public dir, index.html, applicaion.js, spine.js, and applicaion.css now go in the root of the project
* no more Gemfile and ruby dependencies
* no more node_modules, package.json or slugs.json, now you just install coffee-script with "npm install -g coffee-script" and then run cake in the project dir
  • Loading branch information...
1 parent 960155e commit 5ca7b604594116bbe35248b17d98c85bd2732aff @jonmagic jonmagic committed Mar 2, 2012
Showing with 1,554 additions and 1,756 deletions.
  1. +0 −3 .gitignore
  2. +14 −0 Cakefile
  3. +0 −6 Gemfile
  4. +0 −29 Gemfile.lock
  5. +0 −3 Guardfile
  6. +0 −20 LICENSE
  7. +0 −2 Procfile
  8. +20 −1 README.md
  9. +0 −13 app/expression.coffee
  10. +0 −14 app/index.coffee
  11. +0 −15 app/test_strings.coffee
  12. +11 −26 {public/styles → }/application.css
  13. +134 −0 application.js
  14. +0 −23 config.rb
  15. +4 −10 {public → }/index.html
  16. +0 −1,493 lib/handlebars.js
  17. +0 −10 package.json
  18. +35 −3 app/results.coffee → scripts/application.coffee
  19. +528 −0 scripts/spine.coffee
  20. +0 −2 server.coffee
  21. +0 −6 slug.json
  22. +808 −0 spine.js
  23. +0 −77 styles/application.sass
View
@@ -1,3 +0,0 @@
-.rvmrc
-.sass-cache
-node_modules
View
@@ -0,0 +1,14 @@
+{print} = require 'util'
+{spawn} = require 'child_process'
+
+build = (callback) ->
+ coffee = spawn 'coffee', ['-c', '-o', './', 'scripts']
+ coffee.stderr.on 'data', (data) ->
+ process.stderr.write data.toString()
+ coffee.stdout.on 'data', (data) ->
+ print data.toString()
+ coffee.on 'exit', (code) ->
+ callback?() if code is 0
+
+task 'build', 'Build lib/ from src/', ->
+ build()
View
@@ -1,6 +0,0 @@
-source :rubygems
-
-group :development do
- gem 'guard-compass'
- gem 'foreman'
-end
View
@@ -1,29 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- chunky_png (1.2.5)
- compass (0.11.7)
- chunky_png (~> 1.2)
- fssm (>= 0.2.7)
- sass (~> 3.1)
- ffi (1.0.11)
- foreman (0.30.1)
- term-ansicolor (~> 1.0.5)
- thor (>= 0.13.6)
- fssm (0.2.8.1)
- guard (1.0.0)
- ffi (>= 0.5.0)
- thor (~> 0.14.6)
- guard-compass (0.0.6)
- compass (>= 0.10.5)
- guard (>= 0.2.1)
- sass (3.1.12)
- term-ansicolor (1.0.7)
- thor (0.14.6)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- foreman
- guard-compass
View
@@ -1,3 +0,0 @@
-guard 'compass' do
- watch(%r{^styles/(.*)\.s[ac]ss})
-end
View
20 LICENSE
@@ -1,20 +0,0 @@
-Copyright (c) 2011 Jonathan Hoyt
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,2 +0,0 @@
-web: node_modules/hem/bin/hem server
-guard: bundle exec guard
View
@@ -33,4 +33,23 @@ The best way to get your changes merged back into core is as follows:
## License
-See LICENSE for details.
+Copyright (c) 2011 Jonathan Hoyt
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,13 +0,0 @@
-class Expression extends Spine.Controller
- elements:
- 'input[name=expression]': 'regexp'
- 'input[name=option]': 'option'
-
- events:
- 'keyup input': 'onKeyPress'
-
- onKeyPress: (event) ->
- @value = new RegExp(@regexp.val(), @option.val())
- @.trigger 'update'
-
-module.exports = Expression
View
@@ -1,14 +0,0 @@
-require('jqueryify')
-require('spine')
-
-Expression = require 'expression'
-TestStrings = require 'test_strings'
-Results = require 'results'
-
-class App
- constructor: ->
- @expression = new Expression(el: '#expression')
- @test_strings = new TestStrings(el: '#test_strings')
- @results = new Results(@expression, @test_strings)
-
-module.exports = App
View
@@ -1,15 +0,0 @@
-class TestStrings extends Spine.Controller
- elements:
- 'textarea': 'input'
-
- events:
- 'keyup textarea': 'onKeyPress'
-
- onKeyPress: (event) ->
- @getValues(@input.val())
- @.trigger 'update'
-
- getValues: (val) ->
- @values = val.split('\n')
-
-module.exports = TestStrings
@@ -1,4 +1,4 @@
-/* line 17, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
+/* RESET */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
@@ -20,56 +20,49 @@ time, mark, audio, video {
vertical-align: baseline;
}
-/* line 20, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
body {
line-height: 1;
}
-/* line 22, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
ol, ul {
list-style: none;
}
-/* line 24, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
table {
border-collapse: collapse;
border-spacing: 0;
}
-/* line 26, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
-/* line 28, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
quotes: none;
}
-/* line 101, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
+
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}
-/* line 30, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
a img {
border: none;
}
-/* line 114, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.11.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}
-/* line 12, ../../styles/application.sass */
+
+/* my styles */
body {
font-family: Helvetica;
font-size: 18px;
}
-/* line 16, ../../styles/application.sass */
h1 {
font-size: 2em;
font-weight: bold;
@@ -78,13 +71,11 @@ h1 {
width: 100%;
}
-/* line 23, ../../styles/application.sass */
h2 {
font-size: 20px;
margin-bottom: 5px;
}
-/* line 27, ../../styles/application.sass */
#main {
background-color: #eeeeee;
border: 3px solid #666666;
@@ -99,7 +90,6 @@ h2 {
width: 600px;
}
-/* line 35, ../../styles/application.sass */
input, textarea {
margin-bottom: 20px;
background-color: white;
@@ -114,33 +104,29 @@ input, textarea {
border-radius: 5px;
}
-/* line 39, ../../styles/application.sass */
#expression {
font-size: 25px;
}
-/* line 42, ../../styles/application.sass */
+
#expression input[name=expression] {
margin: 0 4px;
width: 530px;
}
-/* line 46, ../../styles/application.sass */
+
#expression input[name=option] {
margin-left: 4px;
width: 40px;
}
-/* line 51, ../../styles/application.sass */
#test_strings textarea {
height: 95px;
width: 100%;
}
-/* line 55, ../../styles/application.sass */
#output {
display: none;
}
-/* line 58, ../../styles/application.sass */
#results {
background-color: white;
border: 1px solid #666666;
@@ -154,20 +140,19 @@ input, textarea {
border-radius: 5px;
margin-bottom: 20px;
}
-/* line 61, ../../styles/application.sass */
+
#results li {
margin-bottom: 10px;
}
-/* line 63, ../../styles/application.sass */
+
#results li:last-child {
margin-bottom: 0px;
}
-/* line 65, ../../styles/application.sass */
+
#results span {
background-color: #f4ff80;
}
-/* line 68, ../../styles/application.sass */
#groups {
background-color: white;
border: 1px solid #666666;
@@ -180,13 +165,13 @@ input, textarea {
-khtml-border-radius: 5px;
border-radius: 5px;
}
-/* line 70, ../../styles/application.sass */
+
#groups h3 {
font-size: 14px;
font-weight: bold;
margin-bottom: 5px;
}
-/* line 74, ../../styles/application.sass */
+
#groups ol {
list-style-type: decimal;
margin-bottom: 10px;
Oops, something went wrong.

0 comments on commit 5ca7b60

Please sign in to comment.