staticise 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rvmrc +1 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +48 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +45 -0
- data/VERSION +1 -0
- data/app/css/test.less +14 -0
- data/app/js/main.coffee +5 -0
- data/app/js/plugins/a.coffee +5 -0
- data/app/layouts/app.haml +49 -0
- data/app/pages/_footer.haml +1 -0
- data/app/pages/cat/index.haml +1 -0
- data/app/pages/dog/index.haml +1 -0
- data/app/pages/index.haml +5 -0
- data/app/pages/lion/index.haml +1 -0
- data/bin/staticise +35 -0
- data/lib/staticise/renderer.rb +96 -0
- data/lib/staticise.rb +10 -0
- data/public/cat/index.html +59 -0
- data/public/css/test.css +9 -0
- data/public/dog/index.html +59 -0
- data/public/index.html +63 -0
- data/public/js/main.js +12 -0
- data/public/js/plugins/a.js +12 -0
- data/public/lion/index.html +59 -0
- data/staticise.gemspec +88 -0
- data/test/helper.rb +18 -0
- data/test/test_staticise.rb +7 -0
- metadata +193 -0
data/.document
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use --create 1.9.3@staticise
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'haml'
|
4
|
+
gem 'coffee-script'
|
5
|
+
gem 'commander'
|
6
|
+
|
7
|
+
# Add dependencies to develop your gem here.
|
8
|
+
# Include everything needed to run rake, tests, features, etc.
|
9
|
+
group :development do
|
10
|
+
gem "shoulda"
|
11
|
+
gem "rdoc"
|
12
|
+
gem "bundler"
|
13
|
+
gem "jeweler"
|
14
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (3.2.13)
|
5
|
+
i18n (= 0.6.1)
|
6
|
+
multi_json (~> 1.0)
|
7
|
+
coffee-script (2.2.0)
|
8
|
+
coffee-script-source
|
9
|
+
execjs
|
10
|
+
coffee-script-source (1.6.2)
|
11
|
+
commander (4.1.3)
|
12
|
+
highline (~> 1.6.11)
|
13
|
+
execjs (1.4.0)
|
14
|
+
multi_json (~> 1.0)
|
15
|
+
git (1.2.5)
|
16
|
+
haml (4.0.2)
|
17
|
+
tilt
|
18
|
+
highline (1.6.18)
|
19
|
+
i18n (0.6.1)
|
20
|
+
jeweler (1.8.4)
|
21
|
+
bundler (~> 1.0)
|
22
|
+
git (>= 1.2.5)
|
23
|
+
rake
|
24
|
+
rdoc
|
25
|
+
json (1.7.7)
|
26
|
+
multi_json (1.7.3)
|
27
|
+
rake (10.0.4)
|
28
|
+
rdoc (4.0.1)
|
29
|
+
json (~> 1.4)
|
30
|
+
shoulda (3.5.0)
|
31
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
32
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
33
|
+
shoulda-context (1.1.1)
|
34
|
+
shoulda-matchers (2.1.0)
|
35
|
+
activesupport (>= 3.0.0)
|
36
|
+
tilt (1.4.1)
|
37
|
+
|
38
|
+
PLATFORMS
|
39
|
+
ruby
|
40
|
+
|
41
|
+
DEPENDENCIES
|
42
|
+
bundler
|
43
|
+
coffee-script
|
44
|
+
commander
|
45
|
+
haml
|
46
|
+
jeweler
|
47
|
+
rdoc
|
48
|
+
shoulda
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Melvin Sembrano
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= staticise
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to staticise
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2013 Melvin Sembrano. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "staticise"
|
18
|
+
gem.homepage = "http://github.com/melvinsembrano/staticise"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Static site generator using Haml and Coffescript }
|
21
|
+
gem.description = %Q{Static site generator using Haml and Coffescript}
|
22
|
+
gem.email = "melvinsembrano@gmail.com"
|
23
|
+
gem.authors = ["Melvin Sembrano"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
task :default => :test
|
36
|
+
|
37
|
+
require 'rdoc/task'
|
38
|
+
Rake::RDocTask.new do |rdoc|
|
39
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
+
|
41
|
+
rdoc.rdoc_dir = 'rdoc'
|
42
|
+
rdoc.title = "staticise #{version}"
|
43
|
+
rdoc.rdoc_files.include('README*')
|
44
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.5.7
|
data/app/css/test.less
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
@the-border: 1px;
|
2
|
+
@base-color: #111;
|
3
|
+
@red: #842210;
|
4
|
+
|
5
|
+
#header {
|
6
|
+
color: (@base-color * 3);
|
7
|
+
border-left: @the-border;
|
8
|
+
border-right: (@the-border * 2);
|
9
|
+
}
|
10
|
+
|
11
|
+
#footer {
|
12
|
+
color: (@base-color + #003300);
|
13
|
+
border-color: desaturate(@red, 10%);
|
14
|
+
}
|
data/app/js/main.coffee
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html(lang="en")
|
3
|
+
%head
|
4
|
+
%meta(charset="utf-8")
|
5
|
+
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
|
6
|
+
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
7
|
+
%title=# content_for?(:title) ? yield(:title) : "isodes"
|
8
|
+
=# csrf_meta_tags
|
9
|
+
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
10
|
+
/[if lt IE 9]
|
11
|
+
=# javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
|
12
|
+
=# stylesheet_link_tag "application", :media => "all"
|
13
|
+
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
|
14
|
+
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
|
15
|
+
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
|
16
|
+
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
|
17
|
+
%link(href="favicon.ico" rel="shortcut icon")
|
18
|
+
|
19
|
+
|
20
|
+
%body
|
21
|
+
.navbar.navbar-fixed-top
|
22
|
+
.navbar-inner
|
23
|
+
.container
|
24
|
+
%a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
|
25
|
+
%span.icon-bar
|
26
|
+
%span.icon-bar
|
27
|
+
%span.icon-bar
|
28
|
+
%a.brand(href="/" title="Im sick of damn excel sheet") isodes
|
29
|
+
.container.nav-collapse
|
30
|
+
%ul.nav
|
31
|
+
%li=# link_to "Teams", "/teams"
|
32
|
+
%li=# link_to "Resources", "/", :confirm => "Not yet implemented"
|
33
|
+
%li=# link_to "PM's", "/", :confirm => "Not yet implemented"
|
34
|
+
%li=# link_to "Clients", "/", :confirm => "Not yet implemented"
|
35
|
+
|
36
|
+
.container.content-panel
|
37
|
+
|
38
|
+
.row
|
39
|
+
.span12
|
40
|
+
=# bootstrap_flash
|
41
|
+
= yield
|
42
|
+
|
43
|
+
%footer
|
44
|
+
%p © melvinsembrano@gmail.com 2013
|
45
|
+
/
|
46
|
+
Javascripts
|
47
|
+
\==================================================
|
48
|
+
/ Placed at the end of the document so the pages load faster
|
49
|
+
=# javascript_include_tag "application"
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 this is a footer
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Cat Page
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Dog Page
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Lion Page
|
data/bin/staticise
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'commander/import'
|
5
|
+
|
6
|
+
$:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
|
7
|
+
require 'staticise'
|
8
|
+
|
9
|
+
|
10
|
+
program :name, 'staticise'
|
11
|
+
program :version, '0.0.1'
|
12
|
+
program :description, 'Static site generator using Haml and Coffeescript'
|
13
|
+
|
14
|
+
default_command :build
|
15
|
+
|
16
|
+
command :build do |c|
|
17
|
+
c.syntax = 'staticise build'
|
18
|
+
c.summary = 'Build all pages, js and css'
|
19
|
+
c.description = 'Build all pages, js and css'
|
20
|
+
c.example 'description', 'command example'
|
21
|
+
c.option '--some-switch', 'Some switch that does something'
|
22
|
+
c.action do |args, options|
|
23
|
+
Staticise::Renderer.all
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
command :init do |c|
|
28
|
+
c.syntax = 'staticise init'
|
29
|
+
c.summary = 'Initialize app, create initial folder structure'
|
30
|
+
c.action do |args, options|
|
31
|
+
Staticise::Renderer.init
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Staticise
|
4
|
+
|
5
|
+
class Renderer
|
6
|
+
attr_accessor :layout, :file
|
7
|
+
|
8
|
+
def initialize(file)
|
9
|
+
extract(file)
|
10
|
+
end
|
11
|
+
|
12
|
+
def render_page
|
13
|
+
Haml::Engine.new(File.read(@layout)).render(self) do
|
14
|
+
Haml::Engine.new(File.read(@file)).render(self)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def partial(file, locals = {})
|
19
|
+
if file.split("/").length > 1
|
20
|
+
path = File.join(APP_ROOT, 'app', 'pages', "_#{ file.to_s }.haml")
|
21
|
+
else
|
22
|
+
path = File.join(File.dirname(@file), "_#{ file.to_s }.haml")
|
23
|
+
end
|
24
|
+
Haml::Engine.new(File.read(path)).render(self, locals)
|
25
|
+
end
|
26
|
+
|
27
|
+
def export
|
28
|
+
b = 'app/pages/'
|
29
|
+
out = File.join(APP_ROOT, 'public', @file[(@file.index(b) + b.length)..-1])
|
30
|
+
out = File.join(File.dirname(out), "#{ File.basename(out, File.extname(out)) }.html")
|
31
|
+
puts " -- compiling #{ @file } => #{ out }"
|
32
|
+
|
33
|
+
FileUtils.mkdir_p(File.dirname(out)) unless File.exist?(File.dirname(out))
|
34
|
+
File.open(out, 'w') {|f| f.puts render_page}
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.compile_css(file)
|
38
|
+
b = 'app/css/'
|
39
|
+
out = File.join(APP_ROOT, 'public', 'css', file[(file.index(b) + b.length)..-1])
|
40
|
+
out = File.join(File.dirname(out), "#{ File.basename(out, File.extname(out)) }.css")
|
41
|
+
puts " -- compiling #{ file } => #{ out }"
|
42
|
+
|
43
|
+
FileUtils.mkdir_p(File.dirname(out)) unless File.exist?(File.dirname(out))
|
44
|
+
`lessc #{ file } #{ out }`
|
45
|
+
true
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
def self.all
|
50
|
+
self.pages
|
51
|
+
self.scripts
|
52
|
+
self.styles
|
53
|
+
puts "DONE..."
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.pages
|
57
|
+
puts "Compiling pages.."
|
58
|
+
files = Dir.glob(File.join(APP_ROOT, 'app/pages/**/*.haml'))
|
59
|
+
files.each do |f|
|
60
|
+
self.new(f).export unless File.basename(f).start_with?("_")
|
61
|
+
end
|
62
|
+
return
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.scripts
|
66
|
+
puts 'compiling coffees...'
|
67
|
+
`coffee -o #{ File.join(APP_ROOT, 'public', 'js') } -c #{ File.join(APP_ROOT, 'app', 'js')}`
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.styles
|
71
|
+
puts "Compiling pages.."
|
72
|
+
files = Dir.glob(File.join(APP_ROOT, 'app/css/**/*.less'))
|
73
|
+
files.each do |f|
|
74
|
+
self.compile_css(f)
|
75
|
+
end
|
76
|
+
return
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
def self.init
|
81
|
+
puts "Creating default folder structure.."
|
82
|
+
%w{app/pages app/layouts app/js app/css}.each do |f|
|
83
|
+
FileUtils.mkdir_p(File.join(APP_ROOT, f)) unless File.exist?(File.join(APP_ROOT, f))
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
private
|
88
|
+
|
89
|
+
def extract(file)
|
90
|
+
@layout = File.join(APP_ROOT, "app", "layouts", "app.haml")
|
91
|
+
@file = file
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
data/lib/staticise.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'>
|
6
|
+
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
7
|
+
<title></title>
|
8
|
+
|
9
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
10
|
+
<!--[if lt IE 9]>
|
11
|
+
|
12
|
+
<![endif]-->
|
13
|
+
|
14
|
+
<link href='images/apple-touch-icon-144x144.png' rel='apple-touch-icon-precomposed' sizes='144x144'>
|
15
|
+
<link href='images/apple-touch-icon-114x114.png' rel='apple-touch-icon-precomposed' sizes='114x114'>
|
16
|
+
<link href='images/apple-touch-icon-72x72.png' rel='apple-touch-icon-precomposed' sizes='72x72'>
|
17
|
+
<link href='images/apple-touch-icon.png' rel='apple-touch-icon-precomposed'>
|
18
|
+
<link href='favicon.ico' rel='shortcut icon'>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div class='navbar navbar-fixed-top'>
|
22
|
+
<div class='navbar-inner'>
|
23
|
+
<div class='container'>
|
24
|
+
<a class='btn btn-navbar' data-target='.nav-collapse' data-toggle='collapse'>
|
25
|
+
<span class='icon-bar'></span>
|
26
|
+
<span class='icon-bar'></span>
|
27
|
+
<span class='icon-bar'></span>
|
28
|
+
</a>
|
29
|
+
<a class='brand' href='/' title='Im sick of damn excel sheet'>isodes</a>
|
30
|
+
<div class='container nav-collapse'>
|
31
|
+
<ul class='nav'>
|
32
|
+
<li></li>
|
33
|
+
<li></li>
|
34
|
+
<li></li>
|
35
|
+
<li></li>
|
36
|
+
</ul>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class='container content-panel'>
|
42
|
+
<div class='row'>
|
43
|
+
<div class='span12'>
|
44
|
+
|
45
|
+
<h1>Cat Page</h1>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<footer>
|
49
|
+
<p>© melvinsembrano@gmail.com 2013</p>
|
50
|
+
</footer>
|
51
|
+
</div>
|
52
|
+
<!--
|
53
|
+
Javascripts
|
54
|
+
==================================================
|
55
|
+
-->
|
56
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
57
|
+
|
58
|
+
</body>
|
59
|
+
</html>
|
data/public/css/test.css
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'>
|
6
|
+
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
7
|
+
<title></title>
|
8
|
+
|
9
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
10
|
+
<!--[if lt IE 9]>
|
11
|
+
|
12
|
+
<![endif]-->
|
13
|
+
|
14
|
+
<link href='images/apple-touch-icon-144x144.png' rel='apple-touch-icon-precomposed' sizes='144x144'>
|
15
|
+
<link href='images/apple-touch-icon-114x114.png' rel='apple-touch-icon-precomposed' sizes='114x114'>
|
16
|
+
<link href='images/apple-touch-icon-72x72.png' rel='apple-touch-icon-precomposed' sizes='72x72'>
|
17
|
+
<link href='images/apple-touch-icon.png' rel='apple-touch-icon-precomposed'>
|
18
|
+
<link href='favicon.ico' rel='shortcut icon'>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div class='navbar navbar-fixed-top'>
|
22
|
+
<div class='navbar-inner'>
|
23
|
+
<div class='container'>
|
24
|
+
<a class='btn btn-navbar' data-target='.nav-collapse' data-toggle='collapse'>
|
25
|
+
<span class='icon-bar'></span>
|
26
|
+
<span class='icon-bar'></span>
|
27
|
+
<span class='icon-bar'></span>
|
28
|
+
</a>
|
29
|
+
<a class='brand' href='/' title='Im sick of damn excel sheet'>isodes</a>
|
30
|
+
<div class='container nav-collapse'>
|
31
|
+
<ul class='nav'>
|
32
|
+
<li></li>
|
33
|
+
<li></li>
|
34
|
+
<li></li>
|
35
|
+
<li></li>
|
36
|
+
</ul>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class='container content-panel'>
|
42
|
+
<div class='row'>
|
43
|
+
<div class='span12'>
|
44
|
+
|
45
|
+
<h1>Dog Page</h1>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<footer>
|
49
|
+
<p>© melvinsembrano@gmail.com 2013</p>
|
50
|
+
</footer>
|
51
|
+
</div>
|
52
|
+
<!--
|
53
|
+
Javascripts
|
54
|
+
==================================================
|
55
|
+
-->
|
56
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
57
|
+
|
58
|
+
</body>
|
59
|
+
</html>
|
data/public/index.html
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'>
|
6
|
+
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
7
|
+
<title></title>
|
8
|
+
|
9
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
10
|
+
<!--[if lt IE 9]>
|
11
|
+
|
12
|
+
<![endif]-->
|
13
|
+
|
14
|
+
<link href='images/apple-touch-icon-144x144.png' rel='apple-touch-icon-precomposed' sizes='144x144'>
|
15
|
+
<link href='images/apple-touch-icon-114x114.png' rel='apple-touch-icon-precomposed' sizes='114x114'>
|
16
|
+
<link href='images/apple-touch-icon-72x72.png' rel='apple-touch-icon-precomposed' sizes='72x72'>
|
17
|
+
<link href='images/apple-touch-icon.png' rel='apple-touch-icon-precomposed'>
|
18
|
+
<link href='favicon.ico' rel='shortcut icon'>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div class='navbar navbar-fixed-top'>
|
22
|
+
<div class='navbar-inner'>
|
23
|
+
<div class='container'>
|
24
|
+
<a class='btn btn-navbar' data-target='.nav-collapse' data-toggle='collapse'>
|
25
|
+
<span class='icon-bar'></span>
|
26
|
+
<span class='icon-bar'></span>
|
27
|
+
<span class='icon-bar'></span>
|
28
|
+
</a>
|
29
|
+
<a class='brand' href='/' title='Im sick of damn excel sheet'>isodes</a>
|
30
|
+
<div class='container nav-collapse'>
|
31
|
+
<ul class='nav'>
|
32
|
+
<li></li>
|
33
|
+
<li></li>
|
34
|
+
<li></li>
|
35
|
+
<li></li>
|
36
|
+
</ul>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class='container content-panel'>
|
42
|
+
<div class='row'>
|
43
|
+
<div class='span12'>
|
44
|
+
|
45
|
+
<h1>Hello World</h1>
|
46
|
+
<p>
|
47
|
+
Hello world, hello world...
|
48
|
+
</p>
|
49
|
+
<h1>this is a footer</h1>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<footer>
|
53
|
+
<p>© melvinsembrano@gmail.com 2013</p>
|
54
|
+
</footer>
|
55
|
+
</div>
|
56
|
+
<!--
|
57
|
+
Javascripts
|
58
|
+
==================================================
|
59
|
+
-->
|
60
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
61
|
+
|
62
|
+
</body>
|
63
|
+
</html>
|
data/public/js/main.js
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'>
|
6
|
+
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
7
|
+
<title></title>
|
8
|
+
|
9
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
10
|
+
<!--[if lt IE 9]>
|
11
|
+
|
12
|
+
<![endif]-->
|
13
|
+
|
14
|
+
<link href='images/apple-touch-icon-144x144.png' rel='apple-touch-icon-precomposed' sizes='144x144'>
|
15
|
+
<link href='images/apple-touch-icon-114x114.png' rel='apple-touch-icon-precomposed' sizes='114x114'>
|
16
|
+
<link href='images/apple-touch-icon-72x72.png' rel='apple-touch-icon-precomposed' sizes='72x72'>
|
17
|
+
<link href='images/apple-touch-icon.png' rel='apple-touch-icon-precomposed'>
|
18
|
+
<link href='favicon.ico' rel='shortcut icon'>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div class='navbar navbar-fixed-top'>
|
22
|
+
<div class='navbar-inner'>
|
23
|
+
<div class='container'>
|
24
|
+
<a class='btn btn-navbar' data-target='.nav-collapse' data-toggle='collapse'>
|
25
|
+
<span class='icon-bar'></span>
|
26
|
+
<span class='icon-bar'></span>
|
27
|
+
<span class='icon-bar'></span>
|
28
|
+
</a>
|
29
|
+
<a class='brand' href='/' title='Im sick of damn excel sheet'>isodes</a>
|
30
|
+
<div class='container nav-collapse'>
|
31
|
+
<ul class='nav'>
|
32
|
+
<li></li>
|
33
|
+
<li></li>
|
34
|
+
<li></li>
|
35
|
+
<li></li>
|
36
|
+
</ul>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class='container content-panel'>
|
42
|
+
<div class='row'>
|
43
|
+
<div class='span12'>
|
44
|
+
|
45
|
+
<h1>Lion Page</h1>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<footer>
|
49
|
+
<p>© melvinsembrano@gmail.com 2013</p>
|
50
|
+
</footer>
|
51
|
+
</div>
|
52
|
+
<!--
|
53
|
+
Javascripts
|
54
|
+
==================================================
|
55
|
+
-->
|
56
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
57
|
+
|
58
|
+
</body>
|
59
|
+
</html>
|
data/staticise.gemspec
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "staticise"
|
8
|
+
s.version = "0.5.7"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Melvin Sembrano"]
|
12
|
+
s.date = "2013-05-15"
|
13
|
+
s.description = "Static site generator using Haml and Coffescript"
|
14
|
+
s.email = "melvinsembrano@gmail.com"
|
15
|
+
s.executables = ["staticise"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
".rvmrc",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"app/css/test.less",
|
30
|
+
"app/js/main.coffee",
|
31
|
+
"app/js/plugins/a.coffee",
|
32
|
+
"app/layouts/app.haml",
|
33
|
+
"app/pages/_footer.haml",
|
34
|
+
"app/pages/cat/index.haml",
|
35
|
+
"app/pages/dog/index.haml",
|
36
|
+
"app/pages/index.haml",
|
37
|
+
"app/pages/lion/index.haml",
|
38
|
+
"bin/staticise",
|
39
|
+
"lib/staticise.rb",
|
40
|
+
"lib/staticise/renderer.rb",
|
41
|
+
"public/cat/index.html",
|
42
|
+
"public/css/test.css",
|
43
|
+
"public/dog/index.html",
|
44
|
+
"public/index.html",
|
45
|
+
"public/js/main.js",
|
46
|
+
"public/js/plugins/a.js",
|
47
|
+
"public/lion/index.html",
|
48
|
+
"staticise.gemspec",
|
49
|
+
"test/helper.rb",
|
50
|
+
"test/test_staticise.rb"
|
51
|
+
]
|
52
|
+
s.homepage = "http://github.com/melvinsembrano/staticise"
|
53
|
+
s.licenses = ["MIT"]
|
54
|
+
s.require_paths = ["lib"]
|
55
|
+
s.rubygems_version = "1.8.25"
|
56
|
+
s.summary = "Static site generator using Haml and Coffescript"
|
57
|
+
|
58
|
+
if s.respond_to? :specification_version then
|
59
|
+
s.specification_version = 3
|
60
|
+
|
61
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
62
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
63
|
+
s.add_runtime_dependency(%q<coffee-script>, [">= 0"])
|
64
|
+
s.add_runtime_dependency(%q<commander>, [">= 0"])
|
65
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
66
|
+
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
67
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
68
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
71
|
+
s.add_dependency(%q<coffee-script>, [">= 0"])
|
72
|
+
s.add_dependency(%q<commander>, [">= 0"])
|
73
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
74
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
75
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
76
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
77
|
+
end
|
78
|
+
else
|
79
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
80
|
+
s.add_dependency(%q<coffee-script>, [">= 0"])
|
81
|
+
s.add_dependency(%q<commander>, [">= 0"])
|
82
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
83
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
84
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
85
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'staticise'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: staticise
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.7
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Melvin Sembrano
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: haml
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: coffee-script
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: commander
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: shoulda
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rdoc
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: bundler
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: jeweler
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
description: Static site generator using Haml and Coffescript
|
127
|
+
email: melvinsembrano@gmail.com
|
128
|
+
executables:
|
129
|
+
- staticise
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files:
|
132
|
+
- LICENSE.txt
|
133
|
+
- README.rdoc
|
134
|
+
files:
|
135
|
+
- .document
|
136
|
+
- .rvmrc
|
137
|
+
- Gemfile
|
138
|
+
- Gemfile.lock
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.rdoc
|
141
|
+
- Rakefile
|
142
|
+
- VERSION
|
143
|
+
- app/css/test.less
|
144
|
+
- app/js/main.coffee
|
145
|
+
- app/js/plugins/a.coffee
|
146
|
+
- app/layouts/app.haml
|
147
|
+
- app/pages/_footer.haml
|
148
|
+
- app/pages/cat/index.haml
|
149
|
+
- app/pages/dog/index.haml
|
150
|
+
- app/pages/index.haml
|
151
|
+
- app/pages/lion/index.haml
|
152
|
+
- bin/staticise
|
153
|
+
- lib/staticise.rb
|
154
|
+
- lib/staticise/renderer.rb
|
155
|
+
- public/cat/index.html
|
156
|
+
- public/css/test.css
|
157
|
+
- public/dog/index.html
|
158
|
+
- public/index.html
|
159
|
+
- public/js/main.js
|
160
|
+
- public/js/plugins/a.js
|
161
|
+
- public/lion/index.html
|
162
|
+
- staticise.gemspec
|
163
|
+
- test/helper.rb
|
164
|
+
- test/test_staticise.rb
|
165
|
+
homepage: http://github.com/melvinsembrano/staticise
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
post_install_message:
|
169
|
+
rdoc_options: []
|
170
|
+
require_paths:
|
171
|
+
- lib
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
none: false
|
174
|
+
requirements:
|
175
|
+
- - ! '>='
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
segments:
|
179
|
+
- 0
|
180
|
+
hash: -2317646311702274304
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
|
+
none: false
|
183
|
+
requirements:
|
184
|
+
- - ! '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
requirements: []
|
188
|
+
rubyforge_project:
|
189
|
+
rubygems_version: 1.8.25
|
190
|
+
signing_key:
|
191
|
+
specification_version: 3
|
192
|
+
summary: Static site generator using Haml and Coffescript
|
193
|
+
test_files: []
|