Permalink
Browse files

Merge pull request #86 from radekstepan/3.0.0

3.0.0
  • Loading branch information...
2 parents 4d890f5 + 82ba347 commit e0fcdc66485fc51f34a2431568094b87be86ac4a @radekstepan committed Mar 21, 2013
Showing with 2,546 additions and 2,290 deletions.
  1. +2 −2 .gitignore
  2. +8 −3 Makefile
  3. +9 −3 README.md
  4. +342 −0 build/server/app.js
  5. +207 −0 build/server/blad.js
  6. +56 −0 build/server/routes/auth.js
  7. +409 −0 build/server/routes/document.js
  8. +31 −0 build/server/routes/documents.js
  9. +38 −0 build/server/routes/sitemap.js
  10. +338 −0 build/server/utils.js
  11. +2 −2 index.js
  12. +0 −980 lib/blad.js
  13. +0 −321 lib/utils.js
  14. +4 −3 package.json
  15. +0 −5 public/admin/js/.gitignore
  16. +0 −4 public/admin/js/templates/.gitignore
  17. 0 {public/admin → src/admin/assets}/css/fonts.css
  18. BIN {public/admin → src/admin/assets}/css/fonts/FontAwesome-webfont.woff
  19. BIN {public/admin → src/admin/assets}/css/fonts/OpenSans-Bold-webfont.woff
  20. BIN {public/admin → src/admin/assets}/css/fonts/OpenSans-ExtraBold-webfont.woff
  21. BIN {public/admin → src/admin/assets}/css/fonts/OpenSans-Light-webfont.woff
  22. BIN {public/admin → src/admin/assets}/css/fonts/OpenSans-Regular-webfont.woff
  23. BIN {public/admin → src/admin/assets}/css/fonts/OpenSans-Semibold-webfont.woff
  24. BIN {public/admin → src/admin/assets}/css/fonts/ProximaNova-Bold-webfont.woff
  25. BIN {public/admin → src/admin/assets}/css/fonts/ProximaNova-Light-webfont.woff
  26. BIN {public/admin → src/admin/assets}/css/fonts/ProximaNova-Reg-webfont.woff
  27. BIN {public/admin → src/admin/assets}/css/fonts/ProximaNova-Xbold-webfont.woff
  28. 0 {public/admin → src/admin/assets}/css/foundation3.css
  29. 0 {public/admin → src/admin/assets}/css/style.css
  30. 0 {public/admin → src/admin/assets}/index.html
  31. 0 {public/admin → src/admin/assets}/js/lib/support.js
  32. 0 {public/admin → src/admin/assets}/js/lib/utils.js
  33. 0 {public/admin → src/admin/assets}/js/vendor/backbone-0.9.2.js
  34. 0 {public/admin → src/admin/assets}/js/vendor/browserid.js
  35. 0 {public/admin → src/admin/assets}/js/vendor/chaplin.js
  36. 0 {public/admin → src/admin/assets}/js/vendor/foundation.js
  37. 0 {public/admin → src/admin/assets}/js/vendor/jquery-1.7.2.js
  38. 0 {public/admin → src/admin/assets}/js/vendor/kronic.js
  39. 0 {public/admin → src/admin/assets}/js/vendor/modernizr.foundation.js
  40. 0 {public/admin → src/admin/assets}/js/vendor/require-2.0.2.js
  41. 0 {public/admin → src/admin/assets}/js/vendor/underscore-1.3.3.js
  42. 0 {admin → src/admin/chaplin}/application.coffee
  43. 0 {admin → src/admin/chaplin}/controllers/documents_controller.coffee
  44. 0 {admin → src/admin/chaplin}/models/document.coffee
  45. 0 {admin → src/admin/chaplin}/models/documents.coffee
  46. 0 {admin → src/admin/chaplin}/routes.coffee
  47. 0 {admin → src/admin/chaplin}/templates/document_edit.eco
  48. 0 {admin → src/admin/chaplin}/templates/document_row.eco
  49. 0 {admin → src/admin/chaplin}/templates/message.eco
  50. 0 {admin → src/admin/chaplin}/views/document_custom_view.coffee
  51. 0 {admin → src/admin/chaplin}/views/document_edit_view.coffee
  52. 0 {admin → src/admin/chaplin}/views/document_list_view.coffee
  53. 0 {admin → src/admin/chaplin}/views/documents_list_view.coffee
  54. 0 {admin → src/admin/chaplin}/views/layout.coffee
  55. 0 {admin → src/admin/chaplin}/views/message_view.coffee
  56. +0 −743 src/blad.coffee
  57. +296 −0 src/server/app.coffee
  58. +113 −0 src/server/blad.coffee
  59. +40 −0 src/server/routes/auth.coffee
  60. +297 −0 src/server/routes/document.coffee
  61. +14 −0 src/server/routes/documents.coffee
  62. +21 −0 src/server/routes/sitemap.coffee
  63. +257 −0 src/server/utils.coffee
  64. +0 −224 src/utils.coffee
  65. 0 test/example_site/src/public/css/style.css
  66. +21 −0 test/example_site/src/types/BasicDocument/form.eco
  67. +11 −0 test/example_site/src/types/BasicDocument/presenter.coffee
  68. +2 −0 test/example_site/src/types/BasicDocument/template.eco
  69. +12 −0 test/example_site/src/types/layout.eco
  70. +16 −0 test/example_site/start.js
View
@@ -1,6 +1,6 @@
node_modules/
-public/site/
-lib-cov/
+build/public/
+build-cov/
coverage.html
*.log
.DS_Store
View
@@ -1,5 +1,9 @@
REPORTER = spec
+# Run an example site.
+example: cs-compile
+ node ./test/example_site/start.js
+
# Run Mocha test suite.
test: cs-compile
@NODE_ENV=test ./node_modules/.bin/mocha --compilers coffee:coffee-script --reporter $(REPORTER) --bail
@@ -13,11 +17,12 @@ prep-coverage: cs-compile node-coverage
# Compile CoffeeScript source.
cs-compile:
- @./node_modules/.bin/coffee -c -o lib/ src/
+ @rm -fr build/
+ @./node_modules/.bin/coffee -c -o build/server src/server
# Enhance compiled source with jscoverage.
node-coverage:
- rm -fr lib-cov/
- @jscoverage lib lib-cov
+ rm -fr build-cov/
+ @jscoverage build build-cov --encoding=UTF-8
.PHONY: test
View
@@ -67,16 +67,16 @@ Represented by a `presenter.coffee` file.
Each document has a custom class that determines how it is rendered. It has to only have a `render` function defined that takes a callback with contect that is passed to a template. As an example of Markdown rendering that returns the HTML result under the `html` key:
```coffeescript
-{ blað } = require 'blad'
+{ blad } = require 'blad'
marked = require 'marked'
-class exports.MarkdownDocument extends blað.Type
+class exports.MarkdownDocument extends blad.Type
# Presentation for the document.
render: (done) -> done 'html': marked @markup
```
-Extending the `blað.Type` class gives us the following helpers:
+Extending the `blad.Type` class gives us the following helpers:
* `@children()` or `@children(n)` that returns public and private documents (optionally of a specific level) that begin with the same URL as the current document... its children.
* `@menu()` that returns public and private top level documents; those documents that have only a leading slash in its URL.
@@ -131,4 +131,10 @@ app.db (collection) ->
collection.find({}).toArray (error, results) ->
results.length.should.equal 0
done()
+```
+
+If you want to test the UI through an example app, execute the following:
+
+```bash
+$ PORT=5200 npm start
```
Oops, something went wrong.

0 comments on commit e0fcdc6

Please sign in to comment.