code_sync 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rvmrc +1 -0
- data/CNAME +1 -0
- data/Gemfile +24 -0
- data/Gemfile.lock +117 -0
- data/LICENSE.md +22 -0
- data/ROADMAP.md +20 -0
- data/TODO.md +14 -0
- data/bin/codesync +11 -0
- data/code_sync.gemspec +30 -0
- data/config/routes.rb +26 -0
- data/lib/assets/javascripts/canvas.coffee +12 -0
- data/lib/assets/javascripts/canvas/editors.coffee +48 -0
- data/lib/assets/javascripts/canvas/index.coffee +15 -0
- data/lib/assets/javascripts/canvas/layer_controller.coffee +47 -0
- data/lib/assets/javascripts/code_sync.coffee +3 -0
- data/lib/assets/javascripts/code_sync/backends/gist.coffee +78 -0
- data/lib/assets/javascripts/code_sync/client/index.coffee +104 -0
- data/lib/assets/javascripts/code_sync/client/util.coffee +61 -0
- data/lib/assets/javascripts/code_sync/codemirror.coffee +12 -0
- data/lib/assets/javascripts/code_sync/config.js.coffee.erb +38 -0
- data/lib/assets/javascripts/code_sync/console/index.coffee +54 -0
- data/lib/assets/javascripts/code_sync/console/templates/console.jst.skim +10 -0
- data/lib/assets/javascripts/code_sync/dependencies.coffee +6 -0
- data/lib/assets/javascripts/code_sync/editor/advanced.coffee +0 -0
- data/lib/assets/javascripts/code_sync/editor/datasources/document.coffee +212 -0
- data/lib/assets/javascripts/code_sync/editor/datasources/gist_loader.coffee +7 -0
- data/lib/assets/javascripts/code_sync/editor/datasources/modes.coffee +117 -0
- data/lib/assets/javascripts/code_sync/editor/datasources/project_assets.coffee +14 -0
- data/lib/assets/javascripts/code_sync/editor/index.coffee +415 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/asset_selector.coffee +106 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/color_picker.coffee +83 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/document_manager.coffee +55 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/document_tabs.coffee +178 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/element_sync.coffee +111 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/keymap_selector.coffee +44 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/mode_selector.coffee +53 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/name_input.coffee +44 -0
- data/lib/assets/javascripts/code_sync/editor/plugins/preferences.coffee +71 -0
- data/lib/assets/javascripts/code_sync/editor/templates/asset_editor.jst.skim +2 -0
- data/lib/assets/javascripts/code_sync/editor/templates/asset_selector.jst.skim +5 -0
- data/lib/assets/javascripts/code_sync/editor/templates/document_manager_tab.jst.skim +15 -0
- data/lib/assets/javascripts/code_sync/editor/templates/element_sync.jst.skim +19 -0
- data/lib/assets/javascripts/code_sync/editor/templates/preferences_panel.jst.skim +38 -0
- data/lib/assets/javascripts/code_sync/editor/views/asset_selector.coffee +106 -0
- data/lib/assets/javascripts/code_sync/editor/views/color_picker.coffee +76 -0
- data/lib/assets/javascripts/code_sync/editor/views/document_manager.coffee +176 -0
- data/lib/assets/javascripts/code_sync/editor/views/keymap_selector.coffee +37 -0
- data/lib/assets/javascripts/code_sync/editor/views/mode_selector.coffee +47 -0
- data/lib/assets/javascripts/code_sync/editor/views/name_input.coffee +44 -0
- data/lib/assets/javascripts/code_sync/editor/views/preferences.coffee +71 -0
- data/lib/assets/javascripts/code_sync/index.coffee +4 -0
- data/lib/assets/javascripts/code_sync/reloader.coffee +2 -0
- data/lib/assets/javascripts/code_sync_basic.coffee +1 -0
- data/lib/assets/javascripts/demos.coffee +48 -0
- data/lib/assets/javascripts/demos/default-content.coffee +72 -0
- data/lib/assets/javascripts/demos/layout_selector.coffee +19 -0
- data/lib/assets/javascripts/demos/tour.coffee +70 -0
- data/lib/assets/javascripts/demos/tour.jst.skim +29 -0
- data/lib/assets/javascripts/marketing.coffee +0 -0
- data/lib/assets/javascripts/vendor/.DS_Store +0 -0
- data/lib/assets/javascripts/vendor/backbone-events.js +160 -0
- data/lib/assets/javascripts/vendor/backbone-min.js +4 -0
- data/lib/assets/javascripts/vendor/codemirror-coffeescript.js +346 -0
- data/lib/assets/javascripts/vendor/codemirror-css.js +570 -0
- data/lib/assets/javascripts/vendor/codemirror-haml.js +153 -0
- data/lib/assets/javascripts/vendor/codemirror-htmlmixed.js +104 -0
- data/lib/assets/javascripts/vendor/codemirror-javascript.js +468 -0
- data/lib/assets/javascripts/vendor/codemirror-markdown.js +526 -0
- data/lib/assets/javascripts/vendor/codemirror-ruby.js +194 -0
- data/lib/assets/javascripts/vendor/codemirror-sass.js +330 -0
- data/lib/assets/javascripts/vendor/codemirror-skim.js +330 -0
- data/lib/assets/javascripts/vendor/codemirror-vim.js +3159 -0
- data/lib/assets/javascripts/vendor/codemirror-xml.js +328 -0
- data/lib/assets/javascripts/vendor/console.js +339 -0
- data/lib/assets/javascripts/vendor/gisted.js +27 -0
- data/lib/assets/javascripts/vendor/jquery-ui-resize-drag.min.js +6 -0
- data/lib/assets/javascripts/vendor/jquery.js +5 -0
- data/lib/assets/javascripts/vendor/keylauncher.js +4 -0
- data/lib/assets/javascripts/vendor/keymaster.min.js +4 -0
- data/lib/assets/javascripts/vendor/spectrum.js +1868 -0
- data/lib/assets/javascripts/vendor/underscore-min.js +1 -0
- data/lib/assets/javascripts/vendor/underscore.string.min.js +1 -0
- data/lib/assets/javascripts/vendor/vendored_codemirror.js +5558 -0
- data/lib/assets/javascripts/vendor/zepto.js +2 -0
- data/lib/assets/stylesheets/canvas.css.scss +101 -0
- data/lib/assets/stylesheets/code_sync.css.scss +4 -0
- data/lib/assets/stylesheets/code_sync/codemirror.css +7 -0
- data/lib/assets/stylesheets/code_sync/console.css +86 -0
- data/lib/assets/stylesheets/code_sync/editor/asset-name-input.css.scss +12 -0
- data/lib/assets/stylesheets/code_sync/editor/asset-selector.css.scss +58 -0
- data/lib/assets/stylesheets/code_sync/editor/codesync-color-picker.css.sass +5 -0
- data/lib/assets/stylesheets/code_sync/editor/document-tabs.css.scss +61 -0
- data/lib/assets/stylesheets/code_sync/editor/element-sync.css.scss +72 -0
- data/lib/assets/stylesheets/code_sync/editor/mode-selector.css.scss +0 -0
- data/lib/assets/stylesheets/code_sync/editor/preferences-panel.css.scss +26 -0
- data/lib/assets/stylesheets/code_sync/index.css.scss +141 -0
- data/lib/assets/stylesheets/demos.css.scss +96 -0
- data/lib/assets/stylesheets/marketing.css.sass +46 -0
- data/lib/assets/stylesheets/marketing/syntax.css.scss +1 -0
- data/lib/assets/stylesheets/vendor/animate.css +1 -0
- data/lib/assets/stylesheets/vendor/codemirror-ambiance.css +75 -0
- data/lib/assets/stylesheets/vendor/codemirror-lesserdark.css +44 -0
- data/lib/assets/stylesheets/vendor/codemirror-monokai.css +28 -0
- data/lib/assets/stylesheets/vendor/codemirror-xq-light.css +43 -0
- data/lib/assets/stylesheets/vendor/grid-layout.css +1406 -0
- data/lib/assets/stylesheets/vendor/spectrum.css +481 -0
- data/lib/assets/stylesheets/vendor/vendored_codemirror.css +246 -0
- data/lib/code_sync.rb +41 -0
- data/lib/code_sync/cli.rb +73 -0
- data/lib/code_sync/manager.rb +238 -0
- data/lib/code_sync/processors.rb +18 -0
- data/lib/code_sync/processors/basic.rb +9 -0
- data/lib/code_sync/processors/jst_processor.rb +17 -0
- data/lib/code_sync/pry_console.rb +132 -0
- data/lib/code_sync/rails.rb +7 -0
- data/lib/code_sync/rails/engine.rb +12 -0
- data/lib/code_sync/server.rb +225 -0
- data/lib/code_sync/sprockets_adapter.rb +145 -0
- data/lib/code_sync/temp_asset.rb +20 -0
- data/lib/code_sync/version.rb +3 -0
- data/lib/middleman_extension.rb +43 -0
- data/readme.md +26 -0
- data/site/.gitignore +14 -0
- data/site/Gemfile +13 -0
- data/site/Gemfile.lock +183 -0
- data/site/config.rb +26 -0
- data/site/source/canvas.html.slim +21 -0
- data/site/source/codepen-style-demo.html.slim +21 -0
- data/site/source/demo.html.slim +30 -0
- data/site/source/index.html.slim +128 -0
- data/site/source/layouts/layout.slim +18 -0
- data/site/source/samples/_client.html.md +13 -0
- data/site/source/samples/_editor.html.md +19 -0
- data/site/source/samples/_hooks.html.md +8 -0
- data/site/source/samples/_middleman.html.md +7 -0
- data/site/source/samples/_rails.html.md +8 -0
- data/site/source/samples/_standalone.html.md +36 -0
- data/spec/lib/code_sync/sprockets_adapter_spec.rb +44 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/.DS_Store +0 -0
- data/spec/support/dummy_middleman/.gitignore +14 -0
- data/spec/support/dummy_middleman/Gemfile +5 -0
- data/spec/support/dummy_middleman/Gemfile.lock +100 -0
- data/spec/support/dummy_middleman/config.rb +77 -0
- data/spec/support/dummy_middleman/source/images/background.png +0 -0
- data/spec/support/dummy_middleman/source/images/middleman.png +0 -0
- data/spec/support/dummy_middleman/source/index.html.erb +10 -0
- data/spec/support/dummy_middleman/source/javascripts/all.js +1 -0
- data/spec/support/dummy_middleman/source/layouts/layout.erb +19 -0
- data/spec/support/dummy_middleman/source/stylesheets/all.css +55 -0
- data/spec/support/dummy_middleman/source/stylesheets/normalize.css +375 -0
- data/spec/support/dummy_rails/.gitignore +15 -0
- data/spec/support/dummy_rails/Gemfile +38 -0
- data/spec/support/dummy_rails/Gemfile.lock +112 -0
- data/spec/support/dummy_rails/README.rdoc +261 -0
- data/spec/support/dummy_rails/Rakefile +7 -0
- data/spec/support/dummy_rails/app/assets/images/rails.png +0 -0
- data/spec/support/dummy_rails/app/assets/javascripts/application.js +15 -0
- data/spec/support/dummy_rails/app/assets/stylesheets/application.css +13 -0
- data/spec/support/dummy_rails/app/controllers/application_controller.rb +3 -0
- data/spec/support/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/spec/support/dummy_rails/app/mailers/.gitkeep +0 -0
- data/spec/support/dummy_rails/app/models/.gitkeep +0 -0
- data/spec/support/dummy_rails/app/views/layouts/application.html.erb +14 -0
- data/spec/support/dummy_rails/config.ru +4 -0
- data/spec/support/dummy_rails/config/application.rb +62 -0
- data/spec/support/dummy_rails/config/boot.rb +6 -0
- data/spec/support/dummy_rails/config/database.yml +25 -0
- data/spec/support/dummy_rails/config/environment.rb +5 -0
- data/spec/support/dummy_rails/config/environments/development.rb +37 -0
- data/spec/support/dummy_rails/config/environments/production.rb +67 -0
- data/spec/support/dummy_rails/config/environments/test.rb +37 -0
- data/spec/support/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/dummy_rails/config/initializers/inflections.rb +15 -0
- data/spec/support/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/spec/support/dummy_rails/config/initializers/secret_token.rb +7 -0
- data/spec/support/dummy_rails/config/initializers/session_store.rb +8 -0
- data/spec/support/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/spec/support/dummy_rails/config/locales/en.yml +5 -0
- data/spec/support/dummy_rails/config/routes.rb +58 -0
- data/spec/support/dummy_rails/db/seeds.rb +7 -0
- data/spec/support/dummy_rails/doc/README_FOR_APP +2 -0
- data/spec/support/dummy_rails/lib/assets/.gitkeep +0 -0
- data/spec/support/dummy_rails/lib/tasks/.gitkeep +0 -0
- data/spec/support/dummy_rails/log/.gitkeep +0 -0
- data/spec/support/dummy_rails/public/404.html +26 -0
- data/spec/support/dummy_rails/public/422.html +26 -0
- data/spec/support/dummy_rails/public/500.html +25 -0
- data/spec/support/dummy_rails/public/favicon.ico +0 -0
- data/spec/support/dummy_rails/public/index.html +241 -0
- data/spec/support/dummy_rails/public/robots.txt +5 -0
- data/spec/support/dummy_rails/script/rails +6 -0
- data/spec/support/dummy_rails/test/fixtures/.gitkeep +0 -0
- data/spec/support/dummy_rails/test/functional/.gitkeep +0 -0
- data/spec/support/dummy_rails/test/integration/.gitkeep +0 -0
- data/spec/support/dummy_rails/test/performance/browsing_test.rb +12 -0
- data/spec/support/dummy_rails/test/test_helper.rb +13 -0
- data/spec/support/dummy_rails/test/unit/.gitkeep +0 -0
- data/spec/support/dummy_rails/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/support/dummy_rails/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/support/dummy_rails/vendor/plugins/.gitkeep +0 -0
- data/spec/support/dummy_static/.DS_Store +0 -0
- data/spec/support/dummy_static/app/.DS_Store +0 -0
- data/spec/support/dummy_static/app/assets/.DS_Store +0 -0
- data/spec/support/dummy_static/app/assets/javascripts/manifest.coffee +4 -0
- data/spec/support/dummy_static/app/assets/javascripts/spec_application_javascript.coffee +4 -0
- data/spec/support/dummy_static/app/assets/stylesheets/spec_application_stylesheet.css.scss +5 -0
- data/spec/support/dummy_static/lib/assets/javascripts/spec_library_javascript.coffee +3 -0
- data/spec/support/dummy_static/lib/assets/stylesheets/spec_library_stylesheet.css.scss +5 -0
- data/spec/support/dummy_static/vendor/assets/javascripts/spec_vendor_javascript.js +5 -0
- data/spec/support/dummy_static/vendor/assets/stylesheets/spec_vendor_stylesheets.css +3 -0
- data/vendor/assets/stylesheets/code_sync.css +1 -0
- metadata +492 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
doctype html
|
|
2
|
+
html lang="en"
|
|
3
|
+
head
|
|
4
|
+
meta charset="utf-8"
|
|
5
|
+
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
|
6
|
+
meta name="author" content="Jonathan Soeder aka Datapimp"
|
|
7
|
+
meta name="keywords" content="asset pipeline tools, coffeescript, sass, codemirror, datapimp, jonathan soeder, soederpop"
|
|
8
|
+
title CodeSync: Asset Pipeline Live Reload
|
|
9
|
+
== stylesheet_link_tag 'code_sync', 'marketing'
|
|
10
|
+
== yield_content(:head)
|
|
11
|
+
|
|
12
|
+
body
|
|
13
|
+
== javascript_include_tag 'code_sync', 'marketing'
|
|
14
|
+
== yield
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
The `CodeSync.Client` sits on top of a websocket connection, and listens for change notifications detected by the `CodeSync::Manager` component that runs on your local development environment.
|
|
2
|
+
|
|
3
|
+
Whenever a change to an asset pipeline asset is detected, the asset is compiled, and a notification is sent to the client, which then applies the updated assets to the running browser session.
|
|
4
|
+
|
|
5
|
+
```haml
|
|
6
|
+
html
|
|
7
|
+
head
|
|
8
|
+
= stylesheet_link_tag 'code_sync'
|
|
9
|
+
body
|
|
10
|
+
= javascript_include_tag 'code_sync'
|
|
11
|
+
:javascript
|
|
12
|
+
window.codeSyncClient = new CodeSync.Client()
|
|
13
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
The editor which gets included with CodeSync can be toggled on and off with a key command of your choosing.
|
|
2
|
+
|
|
3
|
+
You can pass options for the AssetEditor as the second argument.
|
|
4
|
+
|
|
5
|
+
The editor is going to be running on this page. You can enable it by pressing `ctrl+j`, or by clicking at the tab at the top of the screen.
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
// start the editor in SCSS mode, with VIM keybindings
|
|
9
|
+
CodeSync.AssetEditor.setHotKey('ctrl+j', {
|
|
10
|
+
startMode:"scss",
|
|
11
|
+
keyBindings: "vim"
|
|
12
|
+
});
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Note About Dependencies**
|
|
16
|
+
|
|
17
|
+
The CodeSync editor depends on Backbone.js, Underscore.js, Zepto.js, and CodeMirror. If you already have these libraries in your project, you're a boss obviously.
|
|
18
|
+
|
|
19
|
+
To only include the CodeSync assets without any of its dependencies, you can change the way you include the codesync library by only bringing in the code_sync_basic.js javascript.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
If you are not running rails, or middleman, or if you don't want the code sync manager to be running every time you're in development, the gem ships with an executable.
|
|
2
|
+
|
|
3
|
+
This will start an instance of the codesync manager in the root of whatever project you want to watch for asset changes. By default it will look for asset folders
|
|
4
|
+
named
|
|
5
|
+
|
|
6
|
+
- javascripts
|
|
7
|
+
- stylesheets
|
|
8
|
+
- app/assets/javascripts
|
|
9
|
+
- app/assets/stylesheets
|
|
10
|
+
- assets/javascripts
|
|
11
|
+
- assets/stylesheets
|
|
12
|
+
|
|
13
|
+
To install:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
gem install code_sync
|
|
17
|
+
|
|
18
|
+
# now you can use the codesync executable
|
|
19
|
+
codesync start
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
You will want to include the code sync libraries and css in your project.
|
|
23
|
+
|
|
24
|
+
**Note** the CSS is only required if you want to use the editor.
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<html>
|
|
28
|
+
<head>
|
|
29
|
+
<link rel="stylesheet" href="//datapimp.github.io/code_sync/vendor/assets/stylesheets/code_sync.css" />
|
|
30
|
+
</head>
|
|
31
|
+
<body>
|
|
32
|
+
<script type="text/javascript" src="//datapimp.github.io/code_sync/vendor/assets/javascripts/code_sync.js"></script>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
35
|
+
```
|
|
36
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
describe CodeSync::SprocketsAdapter do
|
|
4
|
+
let(:coffeescript) do
|
|
5
|
+
asset = File.join(CodeSync.spec_root,'support','site','app','assets','javascripts','spec_application_javascript.coffee')
|
|
6
|
+
content = IO.read(asset)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
let(:env) do
|
|
10
|
+
site = File.join(CodeSync.spec_root, 'support', 'site')
|
|
11
|
+
CodeSync::SprocketsAdapter.new(root: site)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
let(:manifest) do
|
|
15
|
+
asset = File.join(CodeSync.spec_root,'support','site','app','assets','javascripts','manifest.coffee')
|
|
16
|
+
IO.read(asset)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it "should be able to find an asset" do
|
|
20
|
+
env.find_asset('spec_application_javascript.coffee').should_not be_nil
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it "should be able to compile an asset by filename" do
|
|
24
|
+
env.find_asset("spec_application_javascript.coffee").to_s.should match(/SpecApplication.prototype.boot/)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it "should be able to compile an asset by path" do
|
|
28
|
+
path = File.join(CodeSync.spec_root,'support','site','app','assets','javascripts','spec_application_javascript.coffee')
|
|
29
|
+
env.find_asset(path).to_s.should match(/SpecApplication.prototype.boot/)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it "should be able to compile a coffeescript string into an asset" do
|
|
33
|
+
env.compile(coffeescript, type:"coffeescript").should match("SpecApplication.prototype.boot")
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it "should be able to compile a javascript manifest" do
|
|
37
|
+
compiled = env.compile(manifest, type:"coffeescript")
|
|
38
|
+
|
|
39
|
+
compiled.should match("SpecApplication.prototype.boot")
|
|
40
|
+
compiled.should match("SpecLib")
|
|
41
|
+
compiled.should match("SpecVendorJavascript")
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
unless defined?(CodeSync)
|
|
2
|
+
Bundler.require(:test)
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
require 'code_sync'
|
|
6
|
+
|
|
7
|
+
module CodeSync
|
|
8
|
+
class << self
|
|
9
|
+
attr_accessor :spec_root
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
self.spec_root = File.dirname(__FILE__)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
RSpec.configure do |config|
|
|
16
|
+
config.before(:suite) do
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
+
#
|
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
|
6
|
+
|
|
7
|
+
# Ignore bundler config
|
|
8
|
+
/.bundle
|
|
9
|
+
|
|
10
|
+
# Ignore the build directory
|
|
11
|
+
/build
|
|
12
|
+
|
|
13
|
+
# Ignore Sass' cache
|
|
14
|
+
/.sass-cache
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: http://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
activesupport (3.2.12)
|
|
5
|
+
i18n (~> 0.6)
|
|
6
|
+
multi_json (~> 1.0)
|
|
7
|
+
chunky_png (1.2.7)
|
|
8
|
+
coffee-script (2.2.0)
|
|
9
|
+
coffee-script-source
|
|
10
|
+
execjs
|
|
11
|
+
coffee-script-source (1.3.3)
|
|
12
|
+
compass (0.12.2)
|
|
13
|
+
chunky_png (~> 1.2)
|
|
14
|
+
fssm (>= 0.2.7)
|
|
15
|
+
sass (~> 3.1)
|
|
16
|
+
execjs (1.4.0)
|
|
17
|
+
multi_json (~> 1.0)
|
|
18
|
+
fssm (0.2.10)
|
|
19
|
+
haml (4.0.0)
|
|
20
|
+
tilt
|
|
21
|
+
hike (1.2.1)
|
|
22
|
+
http_router (0.10.2)
|
|
23
|
+
rack (>= 1.0.0)
|
|
24
|
+
url_mount (~> 0.2.1)
|
|
25
|
+
i18n (0.6.4)
|
|
26
|
+
listen (0.7.3)
|
|
27
|
+
maruku (0.6.1)
|
|
28
|
+
syntax (>= 1.0.0)
|
|
29
|
+
middleman (3.0.12)
|
|
30
|
+
middleman-core (= 3.0.12)
|
|
31
|
+
middleman-more (= 3.0.12)
|
|
32
|
+
middleman-sprockets (~> 3.0.8)
|
|
33
|
+
middleman-core (3.0.12)
|
|
34
|
+
activesupport (~> 3.2.6)
|
|
35
|
+
bundler (~> 1.1)
|
|
36
|
+
listen (~> 0.7.3)
|
|
37
|
+
rack (~> 1.4.1)
|
|
38
|
+
rack-test (~> 0.6.1)
|
|
39
|
+
rb-fsevent (~> 0.9.3)
|
|
40
|
+
thor (~> 0.15.4)
|
|
41
|
+
tilt (~> 1.3.1)
|
|
42
|
+
middleman-more (3.0.12)
|
|
43
|
+
coffee-script (~> 2.2.0)
|
|
44
|
+
coffee-script-source (~> 1.3.3)
|
|
45
|
+
compass (>= 0.12.2)
|
|
46
|
+
execjs (~> 1.4.0)
|
|
47
|
+
haml (>= 3.1.6)
|
|
48
|
+
i18n (~> 0.6.0)
|
|
49
|
+
maruku (~> 0.6.0)
|
|
50
|
+
middleman-core (= 3.0.12)
|
|
51
|
+
padrino-helpers (= 0.10.7)
|
|
52
|
+
sass (>= 3.1.20)
|
|
53
|
+
uglifier (~> 1.2.6)
|
|
54
|
+
middleman-sprockets (3.0.9)
|
|
55
|
+
middleman-more (>= 3.0.11)
|
|
56
|
+
sprockets (~> 2.1, < 2.5)
|
|
57
|
+
sprockets-sass (~> 0.9.1)
|
|
58
|
+
multi_json (1.6.1)
|
|
59
|
+
padrino-core (0.10.7)
|
|
60
|
+
activesupport (~> 3.2.0)
|
|
61
|
+
http_router (~> 0.10.2)
|
|
62
|
+
sinatra (~> 1.3.1)
|
|
63
|
+
thor (~> 0.15.2)
|
|
64
|
+
tilt (~> 1.3.0)
|
|
65
|
+
padrino-helpers (0.10.7)
|
|
66
|
+
i18n (~> 0.6)
|
|
67
|
+
padrino-core (= 0.10.7)
|
|
68
|
+
rack (1.4.5)
|
|
69
|
+
rack-protection (1.4.0)
|
|
70
|
+
rack
|
|
71
|
+
rack-test (0.6.2)
|
|
72
|
+
rack (>= 1.0)
|
|
73
|
+
rb-fsevent (0.9.3)
|
|
74
|
+
sass (3.2.7)
|
|
75
|
+
sinatra (1.3.5)
|
|
76
|
+
rack (~> 1.4)
|
|
77
|
+
rack-protection (~> 1.3)
|
|
78
|
+
tilt (~> 1.3, >= 1.3.3)
|
|
79
|
+
sprockets (2.4.5)
|
|
80
|
+
hike (~> 1.2)
|
|
81
|
+
multi_json (~> 1.0)
|
|
82
|
+
rack (~> 1.0)
|
|
83
|
+
tilt (~> 1.1, != 1.3.0)
|
|
84
|
+
sprockets-sass (0.9.1)
|
|
85
|
+
sprockets (~> 2.0)
|
|
86
|
+
tilt (~> 1.1)
|
|
87
|
+
syntax (1.0.0)
|
|
88
|
+
thor (0.15.4)
|
|
89
|
+
tilt (1.3.5)
|
|
90
|
+
uglifier (1.2.7)
|
|
91
|
+
execjs (>= 0.3.0)
|
|
92
|
+
multi_json (~> 1.3)
|
|
93
|
+
url_mount (0.2.1)
|
|
94
|
+
rack
|
|
95
|
+
|
|
96
|
+
PLATFORMS
|
|
97
|
+
ruby
|
|
98
|
+
|
|
99
|
+
DEPENDENCIES
|
|
100
|
+
middleman (~> 3.0.12)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
###
|
|
2
|
+
# Compass
|
|
3
|
+
###
|
|
4
|
+
|
|
5
|
+
# Susy grids in Compass
|
|
6
|
+
# First: gem install susy
|
|
7
|
+
# require 'susy'
|
|
8
|
+
|
|
9
|
+
# Change Compass configuration
|
|
10
|
+
# compass_config do |config|
|
|
11
|
+
# config.output_style = :compact
|
|
12
|
+
# end
|
|
13
|
+
|
|
14
|
+
###
|
|
15
|
+
# Page options, layouts, aliases and proxies
|
|
16
|
+
###
|
|
17
|
+
|
|
18
|
+
# Per-page layout changes:
|
|
19
|
+
#
|
|
20
|
+
# With no layout
|
|
21
|
+
# page "/path/to/file.html", :layout => false
|
|
22
|
+
#
|
|
23
|
+
# With alternative layout
|
|
24
|
+
# page "/path/to/file.html", :layout => :otherlayout
|
|
25
|
+
#
|
|
26
|
+
# A path which all have the same layout
|
|
27
|
+
# with_layout :admin do
|
|
28
|
+
# page "/admin/*"
|
|
29
|
+
# end
|
|
30
|
+
|
|
31
|
+
# Proxy (fake) files
|
|
32
|
+
# page "/this-page-has-no-template.html", :proxy => "/template-file.html" do
|
|
33
|
+
# @which_fake_page = "Rendering a fake page with a variable"
|
|
34
|
+
# end
|
|
35
|
+
|
|
36
|
+
###
|
|
37
|
+
# Helpers
|
|
38
|
+
###
|
|
39
|
+
|
|
40
|
+
# Automatic image dimensions on image_tag helper
|
|
41
|
+
# activate :automatic_image_sizes
|
|
42
|
+
|
|
43
|
+
# Methods defined in the helpers block are available in templates
|
|
44
|
+
# helpers do
|
|
45
|
+
# def some_helper
|
|
46
|
+
# "Helping"
|
|
47
|
+
# end
|
|
48
|
+
# end
|
|
49
|
+
|
|
50
|
+
set :css_dir, 'stylesheets'
|
|
51
|
+
|
|
52
|
+
set :js_dir, 'javascripts'
|
|
53
|
+
|
|
54
|
+
set :images_dir, 'images'
|
|
55
|
+
|
|
56
|
+
# Build-specific configuration
|
|
57
|
+
configure :build do
|
|
58
|
+
# For example, change the Compass output style for deployment
|
|
59
|
+
# activate :minify_css
|
|
60
|
+
|
|
61
|
+
# Minify Javascript on build
|
|
62
|
+
# activate :minify_javascript
|
|
63
|
+
|
|
64
|
+
# Enable cache buster
|
|
65
|
+
# activate :cache_buster
|
|
66
|
+
|
|
67
|
+
# Use relative URLs
|
|
68
|
+
# activate :relative_assets
|
|
69
|
+
|
|
70
|
+
# Compress PNGs after build
|
|
71
|
+
# First: gem install middleman-smusher
|
|
72
|
+
# require "middleman-smusher"
|
|
73
|
+
# activate :smusher
|
|
74
|
+
|
|
75
|
+
# Or use a different image path
|
|
76
|
+
# set :http_path, "/Content/images/"
|
|
77
|
+
end
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//= require_tree .
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
|
|
6
|
+
<!-- Always force latest IE rendering engine or request Chrome Frame -->
|
|
7
|
+
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
|
8
|
+
|
|
9
|
+
<!-- Use title if it's in the page YAML frontmatter -->
|
|
10
|
+
<title><%= data.page.title || "The Middleman" %></title>
|
|
11
|
+
|
|
12
|
+
<%= stylesheet_link_tag "normalize", "all" %>
|
|
13
|
+
<%= javascript_include_tag "all" %>
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body class="<%= page_classes %>">
|
|
17
|
+
<%= yield %>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
background: #d4d4d4 url("../images/background.png");
|
|
5
|
+
text-align: center;
|
|
6
|
+
font-family: sans-serif; }
|
|
7
|
+
|
|
8
|
+
h1 {
|
|
9
|
+
color: rgba(0, 0, 0, .3);
|
|
10
|
+
font-weight: bold;
|
|
11
|
+
font-size: 32px;
|
|
12
|
+
letter-spacing: -1px;
|
|
13
|
+
text-transform: uppercase;
|
|
14
|
+
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
|
|
15
|
+
background: url("../images/middleman.png") no-repeat center 100px;
|
|
16
|
+
padding: 350px 0 10px;
|
|
17
|
+
margin: 0; }
|
|
18
|
+
|
|
19
|
+
.doc {
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
margin: 0; }
|
|
22
|
+
.doc:before,
|
|
23
|
+
.doc:after {
|
|
24
|
+
opacity: .2;
|
|
25
|
+
padding: 6px;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
position: relative;
|
|
28
|
+
content: "•"; }
|
|
29
|
+
.doc a {
|
|
30
|
+
color: rgba(0, 0, 0, 0.3); }
|
|
31
|
+
.doc a:hover {
|
|
32
|
+
color: #666; }
|
|
33
|
+
|
|
34
|
+
.welcome {
|
|
35
|
+
-webkit-animation-name: welcome;
|
|
36
|
+
-webkit-animation-duration: .9s; }
|
|
37
|
+
|
|
38
|
+
@-webkit-keyframes welcome {
|
|
39
|
+
from {
|
|
40
|
+
-webkit-transform: scale(0);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
50% {
|
|
44
|
+
-webkit-transform: scale(0);
|
|
45
|
+
opacity: 0;
|
|
46
|
+
}
|
|
47
|
+
82.5% {
|
|
48
|
+
-webkit-transform: scale(1.03);
|
|
49
|
+
-webkit-animation-timing-function: ease-out;
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
to {
|
|
53
|
+
-webkit-transform: scale(1);
|
|
54
|
+
}
|
|
55
|
+
}
|