visionmedia-mini 0.0.2
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/History.rdoc +8 -0
- data/Manifest +22 -0
- data/README.rdoc +50 -0
- data/Rakefile +17 -0
- data/Todo.rdoc +14 -0
- data/bin/mini +74 -0
- data/mini.gemspec +39 -0
- data/spec/mini_spec.rb +0 -0
- data/spec/spec_helper.rb +1 -0
- data/tasks/docs.rake +13 -0
- data/tasks/gemspec.rake +3 -0
- data/tasks/spec.rake +25 -0
- data/templates/light/index.haml +25 -0
- data/templates/light/style.sass +77 -0
- metadata +102 -0
data/History.rdoc
ADDED
data/Manifest
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
bin/mini
|
2
|
+
History.rdoc
|
3
|
+
Manifest
|
4
|
+
mini.gemspec
|
5
|
+
Rakefile
|
6
|
+
README.rdoc
|
7
|
+
spec/mini_spec.rb
|
8
|
+
spec/spec_helper.rb
|
9
|
+
tasks/docs.rake
|
10
|
+
tasks/gemspec.rake
|
11
|
+
tasks/spec.rake
|
12
|
+
templates/light/index.haml
|
13
|
+
templates/light/style.sass
|
14
|
+
test/assets/foo/foo.sass
|
15
|
+
test/assets/index.haml
|
16
|
+
test/assets/index.html
|
17
|
+
test/assets/style.css
|
18
|
+
test/assets/style.sass
|
19
|
+
test/foo/foo.css
|
20
|
+
test/index.html
|
21
|
+
test/style.css
|
22
|
+
Todo.rdoc
|
data/README.rdoc
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
= Mini
|
3
|
+
|
4
|
+
Github project page framework. Generate and compile
|
5
|
+
static Sass / Haml mini-sites within seconds.
|
6
|
+
|
7
|
+
== Features
|
8
|
+
|
9
|
+
* Attractive templates
|
10
|
+
* Template generator
|
11
|
+
* Refreshes browser(s) / re-compiles Sass / Haml while you edit your source
|
12
|
+
|
13
|
+
== Usage
|
14
|
+
|
15
|
+
View mini's help
|
16
|
+
$ mini help
|
17
|
+
|
18
|
+
Initialize a new mini project in the current working directory
|
19
|
+
$ mini init
|
20
|
+
|
21
|
+
Refresh Safari and Firefox to index.html and recompile when a file is changed (use from the root of your project)
|
22
|
+
$ mini refresh --browsers Safari,Firefox
|
23
|
+
|
24
|
+
Refresh usage.html (no need for extensions)
|
25
|
+
$ mini refresh usage
|
26
|
+
|
27
|
+
== License:
|
28
|
+
|
29
|
+
(The MIT License)
|
30
|
+
|
31
|
+
Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>
|
32
|
+
|
33
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
34
|
+
a copy of this software and associated documentation files (the
|
35
|
+
'Software'), to deal in the Software without restriction, including
|
36
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
37
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
38
|
+
permit persons to whom the Software is furnished to do so, subject to
|
39
|
+
the following conditions:
|
40
|
+
|
41
|
+
The above copyright notice and this permission notice shall be
|
42
|
+
included in all copies or substantial portions of the Software.
|
43
|
+
|
44
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
45
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
46
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
47
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
48
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
49
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
50
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
require 'rubygems'
|
3
|
+
require 'rake'
|
4
|
+
require 'echoe'
|
5
|
+
load File.dirname(__FILE__) + '/bin/mini'
|
6
|
+
|
7
|
+
Echoe.new('mini', program(:version)) do |p|
|
8
|
+
p.author = "TJ Holowaychuk"
|
9
|
+
p.email = "tj@vision-media.ca"
|
10
|
+
p.summary = "Github project page framework"
|
11
|
+
p.url = "http://visionmedia.github.com/mini"
|
12
|
+
p.runtime_dependencies = []
|
13
|
+
p.runtime_dependencies << 'visionmedia-commander >=2.4.6'
|
14
|
+
p.runtime_dependencies << 'visionmedia-bind >=0.2.1'
|
15
|
+
end
|
16
|
+
|
17
|
+
Dir['tasks/**/*.rake'].sort.each { |f| load f }
|
data/Todo.rdoc
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
== Major:
|
3
|
+
|
4
|
+
* ERB templates / allow templates to have a .rb file to gather input for the erb vars
|
5
|
+
* RDoc deployment (find a good default theme or make one)
|
6
|
+
* Git branch without relation to others (document)
|
7
|
+
|
8
|
+
== Minor:
|
9
|
+
|
10
|
+
* Nothing
|
11
|
+
|
12
|
+
== Brainstorming:
|
13
|
+
|
14
|
+
* Nothing
|
data/bin/mini
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
require 'rubygems'
|
5
|
+
require 'commander'
|
6
|
+
require 'bind'
|
7
|
+
|
8
|
+
program :name, 'mini'
|
9
|
+
program :version, '0.0.2'
|
10
|
+
program :description, 'Github project page framework'
|
11
|
+
|
12
|
+
class CompileHaml < Bind::Actions::RefreshBrowsers
|
13
|
+
def call file
|
14
|
+
type = sass?(file) ? :sass : :haml
|
15
|
+
dest = dest_for file.path
|
16
|
+
FileUtils.mkdir_p File.dirname(dest) unless File.directory? File.dirname(dest)
|
17
|
+
`#{type} #{file.path} #{dest}`
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def sass? file
|
22
|
+
file.path.include? '.sass'
|
23
|
+
end
|
24
|
+
|
25
|
+
def haml? file
|
26
|
+
file.path.include? '.haml'
|
27
|
+
end
|
28
|
+
|
29
|
+
def dest_for path
|
30
|
+
path.gsub! 'assets/', './'
|
31
|
+
path.gsub! '.sass', '.css'
|
32
|
+
path.gsub! '.haml', '.html'
|
33
|
+
path
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
command :refresh do |c|
|
38
|
+
c.syntax = 'mini refresh [page] [options]'
|
39
|
+
c.summary = 'Refresh a <page>'
|
40
|
+
c.description = 'Refresh a <page> using one or more browsers; Auto-compiles Haml and Sass'
|
41
|
+
c.example 'Defaults to refreshing index', 'mini refresh'
|
42
|
+
c.example 'Refresh the index page, compiling haml/sass from the assets dir to the current working directory', 'mini refresh'
|
43
|
+
c.example 'Refresh Firefox and Safari to foo.html once compiled', 'mini refresh foo --browsers Safari,Firefox'
|
44
|
+
c.option '-b', '--browsers BROWSERS', Array, 'List browsers to refresh. Defaults to Safari'
|
45
|
+
c.when_called do |args, options|
|
46
|
+
actions = []
|
47
|
+
page = args.shift || 'index'
|
48
|
+
browsers = options.browsers || ['Safari']
|
49
|
+
haml = Dir["assets/**/*.haml"]
|
50
|
+
sass = Dir["assets/**/*.sass"]
|
51
|
+
uri = File.join Dir.getwd, "#{page}.html"
|
52
|
+
actions << CompileHaml.new(uri, *browsers)
|
53
|
+
listener = Bind::Listener.new :interval => 1, :debug => $stdout, :actions => actions, :paths => haml + sass
|
54
|
+
listener.run!
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
command :init do |c|
|
59
|
+
c.syntax = 'mini init [dest_dir] [options]'
|
60
|
+
c.summary = 'Initialize a mini template'
|
61
|
+
c.description = 'Initialize a mini template to <dest_dir> or the current working directory.'
|
62
|
+
c.example 'Initialize a template in the current directory', 'mini init'
|
63
|
+
#c.option '--template TEMPLATE', 'Name of template to use'
|
64
|
+
c.when_called do |args, options|
|
65
|
+
require 'fileutils'
|
66
|
+
dest = args.shift || '.'
|
67
|
+
template = options.template || 'light'
|
68
|
+
template_dir = File.join File.dirname(__FILE__), '..', 'templates', template
|
69
|
+
abort 'invalid template name.' unless File.directory? template_dir
|
70
|
+
FileUtils.cp_r "#{template_dir}/.", "#{dest}/assets"
|
71
|
+
puts "#{template} template initialized at #{dest}"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
data/mini.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{mini}
|
5
|
+
s.version = "0.0.2"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["TJ Holowaychuk"]
|
9
|
+
s.date = %q{2009-03-09}
|
10
|
+
s.default_executable = %q{mini}
|
11
|
+
s.description = %q{Github project page framework}
|
12
|
+
s.email = %q{tj@vision-media.ca}
|
13
|
+
s.executables = ["mini"]
|
14
|
+
s.extra_rdoc_files = ["bin/mini", "README.rdoc", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
|
15
|
+
s.files = ["bin/mini", "History.rdoc", "Manifest", "mini.gemspec", "Rakefile", "README.rdoc", "spec/mini_spec.rb", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake", "templates/light/index.haml", "templates/light/style.sass", "test/assets/foo/foo.sass", "test/assets/index.haml", "test/assets/index.html", "test/assets/style.css", "test/assets/style.sass", "test/foo/foo.css", "test/index.html", "test/style.css", "Todo.rdoc"]
|
16
|
+
s.has_rdoc = true
|
17
|
+
s.homepage = %q{http://visionmedia.github.com/mini}
|
18
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Mini", "--main", "README.rdoc"]
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
s.rubyforge_project = %q{mini}
|
21
|
+
s.rubygems_version = %q{1.3.1}
|
22
|
+
s.summary = %q{Github project page framework}
|
23
|
+
|
24
|
+
if s.respond_to? :specification_version then
|
25
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
26
|
+
s.specification_version = 2
|
27
|
+
|
28
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
29
|
+
s.add_runtime_dependency(%q<visionmedia-commander>, [">= 2.4.6"])
|
30
|
+
s.add_runtime_dependency(%q<visionmedia-bind>, [">= 0.2.1"])
|
31
|
+
else
|
32
|
+
s.add_dependency(%q<visionmedia-commander>, [">= 2.4.6"])
|
33
|
+
s.add_dependency(%q<visionmedia-bind>, [">= 0.2.1"])
|
34
|
+
end
|
35
|
+
else
|
36
|
+
s.add_dependency(%q<visionmedia-commander>, [">= 2.4.6"])
|
37
|
+
s.add_dependency(%q<visionmedia-bind>, [">= 0.2.1"])
|
38
|
+
end
|
39
|
+
end
|
data/spec/mini_spec.rb
ADDED
File without changes
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/tasks/docs.rake
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
namespace :docs do
|
3
|
+
|
4
|
+
desc 'Remove rdoc products'
|
5
|
+
task :remove => [:clobber_docs]
|
6
|
+
|
7
|
+
desc 'Build docs, and open in browser for viewing (specify BROWSER)'
|
8
|
+
task :open do
|
9
|
+
browser = ENV["BROWSER"] || "safari"
|
10
|
+
sh "open -a #{browser} doc/index.html"
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
data/tasks/gemspec.rake
ADDED
data/tasks/spec.rake
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
require 'spec/rake/spectask'
|
3
|
+
|
4
|
+
desc "Run all specifications"
|
5
|
+
Spec::Rake::SpecTask.new(:spec) do |t|
|
6
|
+
t.libs << "lib"
|
7
|
+
t.spec_opts = ["--color", "--require", "spec/spec_helper.rb"]
|
8
|
+
end
|
9
|
+
|
10
|
+
namespace :spec do
|
11
|
+
|
12
|
+
desc "Run all specifications verbosely"
|
13
|
+
Spec::Rake::SpecTask.new(:verbose) do |t|
|
14
|
+
t.libs << "lib"
|
15
|
+
t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Run specific specification verbosely (specify SPEC)"
|
19
|
+
Spec::Rake::SpecTask.new(:select) do |t|
|
20
|
+
t.libs << "lib"
|
21
|
+
t.spec_files = [ENV["SPEC"]]
|
22
|
+
t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title Project - Tagline
|
5
|
+
%link{ :rel => 'stylesheet', :href => 'style.css' }
|
6
|
+
%body
|
7
|
+
%a{ :href => 'http://github.com/username/project' }
|
8
|
+
%img#ribbon{ :src => 'http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png', :alt => 'Fork me on GitHub' }
|
9
|
+
|
10
|
+
#container
|
11
|
+
#download
|
12
|
+
%a{ :href => 'http://github.com/visionmedia/username/project/master' }
|
13
|
+
%img{ :src => 'http://github.com/images/modules/download/zip.png' }
|
14
|
+
%a{ :href => 'http://github.com/visionmedia/username/project/master' }
|
15
|
+
%img{ :src => 'http://github.com/images/modules/download/tar.png' }
|
16
|
+
%h1
|
17
|
+
Project
|
18
|
+
%em Tagline
|
19
|
+
|
20
|
+
%p
|
21
|
+
Description and body
|
22
|
+
|
23
|
+
.footer
|
24
|
+
this mini site brought to you by :
|
25
|
+
%a{ :href => 'http://github.com/visionmedia/mini' } visionmedia/mini
|
@@ -0,0 +1,77 @@
|
|
1
|
+
|
2
|
+
=transitions
|
3
|
+
:-webkit-transition-property opacity, -webkit-transform, color, background-color, padding
|
4
|
+
:-webkit-transition-duration 0.2s
|
5
|
+
:-webkit-transition-timing-function ease-out
|
6
|
+
|
7
|
+
body
|
8
|
+
:margin 30px 0
|
9
|
+
:font-family "Helvetica"
|
10
|
+
:font-size 14px
|
11
|
+
:line-height 1.5
|
12
|
+
:color black
|
13
|
+
|
14
|
+
a img
|
15
|
+
:border none !important
|
16
|
+
|
17
|
+
a
|
18
|
+
:text-decoration none
|
19
|
+
:font-weight bold
|
20
|
+
:color black
|
21
|
+
|
22
|
+
&:hover
|
23
|
+
:color #0091FF
|
24
|
+
|
25
|
+
ul li a
|
26
|
+
+transitions
|
27
|
+
|
28
|
+
&:hover
|
29
|
+
:padding 0 8px
|
30
|
+
|
31
|
+
h1
|
32
|
+
:padding 80px 0 10px
|
33
|
+
:font-size 50px
|
34
|
+
|
35
|
+
em
|
36
|
+
:font-style normal
|
37
|
+
:font-size 15px
|
38
|
+
|
39
|
+
h2
|
40
|
+
:margin 40px 0 15px 0
|
41
|
+
:padding-top 20px
|
42
|
+
:border 0
|
43
|
+
:border-top 1px solid #aaa
|
44
|
+
:font-size 20px
|
45
|
+
|
46
|
+
pre
|
47
|
+
:display block
|
48
|
+
:padding 25px 30px
|
49
|
+
:background black
|
50
|
+
:font-family "Bitstream Vera Sans Mono"
|
51
|
+
:white-space pre
|
52
|
+
:color white
|
53
|
+
|
54
|
+
.footer
|
55
|
+
:padding-top 30px
|
56
|
+
:text-align center
|
57
|
+
:font-style italic
|
58
|
+
|
59
|
+
#ribbon
|
60
|
+
:position absolute
|
61
|
+
:top 0
|
62
|
+
:right 0
|
63
|
+
|
64
|
+
#container
|
65
|
+
:margin 0 auto
|
66
|
+
:width 700px
|
67
|
+
|
68
|
+
#download
|
69
|
+
:float right
|
70
|
+
|
71
|
+
a img
|
72
|
+
+transitions
|
73
|
+
|
74
|
+
&:hover
|
75
|
+
:z-index 10
|
76
|
+
:-webkit-transform translate(10px, -10px) scale(1.05)
|
77
|
+
:opacity 0.65
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: visionmedia-mini
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- TJ Holowaychuk
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-03-09 00:00:00 -07:00
|
13
|
+
default_executable: mini
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: visionmedia-commander
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.4.6
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: visionmedia-bind
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.1
|
34
|
+
version:
|
35
|
+
description: Github project page framework
|
36
|
+
email: tj@vision-media.ca
|
37
|
+
executables:
|
38
|
+
- mini
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- bin/mini
|
43
|
+
- README.rdoc
|
44
|
+
- tasks/docs.rake
|
45
|
+
- tasks/gemspec.rake
|
46
|
+
- tasks/spec.rake
|
47
|
+
files:
|
48
|
+
- bin/mini
|
49
|
+
- History.rdoc
|
50
|
+
- Manifest
|
51
|
+
- mini.gemspec
|
52
|
+
- Rakefile
|
53
|
+
- README.rdoc
|
54
|
+
- spec/mini_spec.rb
|
55
|
+
- spec/spec_helper.rb
|
56
|
+
- tasks/docs.rake
|
57
|
+
- tasks/gemspec.rake
|
58
|
+
- tasks/spec.rake
|
59
|
+
- templates/light/index.haml
|
60
|
+
- templates/light/style.sass
|
61
|
+
- test/assets/foo/foo.sass
|
62
|
+
- test/assets/index.haml
|
63
|
+
- test/assets/index.html
|
64
|
+
- test/assets/style.css
|
65
|
+
- test/assets/style.sass
|
66
|
+
- test/foo/foo.css
|
67
|
+
- test/index.html
|
68
|
+
- test/style.css
|
69
|
+
- Todo.rdoc
|
70
|
+
has_rdoc: true
|
71
|
+
homepage: http://visionmedia.github.com/mini
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options:
|
74
|
+
- --line-numbers
|
75
|
+
- --inline-source
|
76
|
+
- --title
|
77
|
+
- Mini
|
78
|
+
- --main
|
79
|
+
- README.rdoc
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: "0"
|
87
|
+
version:
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: "1.2"
|
93
|
+
version:
|
94
|
+
requirements: []
|
95
|
+
|
96
|
+
rubyforge_project: mini
|
97
|
+
rubygems_version: 1.2.0
|
98
|
+
signing_key:
|
99
|
+
specification_version: 2
|
100
|
+
summary: Github project page framework
|
101
|
+
test_files: []
|
102
|
+
|