marv 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitmodules +3 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +29 -0
- data/Gemfile.lock +140 -0
- data/LICENSE +20 -0
- data/README.md +49 -0
- data/Rakefile +54 -0
- data/VERSION +1 -0
- data/bin/marv +12 -0
- data/features/step_definitions/marv_steps.rb +38 -0
- data/features/support/env.rb +17 -0
- data/layouts/config/config.tt +19 -0
- data/layouts/default/functions/functions.php.erb +34 -0
- data/layouts/default/javascripts/admin.js +1 -0
- data/layouts/default/javascripts/theme.js +1 -0
- data/layouts/default/stylesheets/_header.scss.erb +18 -0
- data/layouts/default/stylesheets/_reset.scss +5 -0
- data/layouts/default/stylesheets/_typography.scss +5 -0
- data/layouts/default/stylesheets/style.css.scss.erb +32 -0
- data/layouts/default/templates/404.php.erb +10 -0
- data/layouts/default/templates/archive.php.erb +11 -0
- data/layouts/default/templates/attachment.php.erb +32 -0
- data/layouts/default/templates/comments.php +2 -0
- data/layouts/default/templates/footer.php +9 -0
- data/layouts/default/templates/header.php.erb +30 -0
- data/layouts/default/templates/index.php +4 -0
- data/layouts/default/templates/page.php +14 -0
- data/layouts/default/templates/partials/loop.php.erb +36 -0
- data/layouts/default/templates/search.php.erb +12 -0
- data/layouts/default/templates/sidebar.php +9 -0
- data/layouts/default/templates/single.php.erb +30 -0
- data/lib/guard/marv/assets.rb +31 -0
- data/lib/guard/marv/config.rb +34 -0
- data/lib/guard/marv/functions.rb +36 -0
- data/lib/guard/marv/templates.rb +28 -0
- data/lib/marv.rb +11 -0
- data/lib/marv/builder.rb +282 -0
- data/lib/marv/cli.rb +86 -0
- data/lib/marv/config.rb +61 -0
- data/lib/marv/engines.rb +12 -0
- data/lib/marv/error.rb +8 -0
- data/lib/marv/generator.rb +138 -0
- data/lib/marv/guard.rb +65 -0
- data/lib/marv/project.rb +162 -0
- data/lib/marv/version.rb +3 -0
- data/marv.gemspec +145 -0
- data/spec/lib/marv/config_spec.rb +79 -0
- data/spec/lib/marv/project_spec.rb +34 -0
- data/spec/spec_helper.rb +13 -0
- metadata +404 -0
data/.document
ADDED
data/.gitmodules
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
gem "thor", ">= 0.18.1"
|
7
|
+
gem "guard", ">= 2.2.1"
|
8
|
+
gem "guard-livereload", ">= 2.0.0"
|
9
|
+
gem "sprockets", ">= 2.12.0"
|
10
|
+
gem "rubyzip", ">= 1.0.0"
|
11
|
+
gem "json", ">= 1.8.0"
|
12
|
+
gem "sass", ">= 3.3.0"
|
13
|
+
gem "sprockets-sass", ">= 1.2.0"
|
14
|
+
gem "compass", ">= 1.0.0.alpha.21"
|
15
|
+
gem 'rack', '>= 1.5.2'
|
16
|
+
gem "therubyracer", ">= 0.12.0"
|
17
|
+
gem "less", ">= 2.6.0"
|
18
|
+
gem "coffee-script", ">= 2.3.0"
|
19
|
+
gem "rb-fsevent", ">= 0.9.3"
|
20
|
+
gem "yui-compressor", ">= 0.12.0"
|
21
|
+
|
22
|
+
# Add dependencies to develop your gem here.
|
23
|
+
# Include everything needed to run rake, tests, features, etc.
|
24
|
+
group :development do
|
25
|
+
gem "rspec"
|
26
|
+
gem "cucumber", ">= 0"
|
27
|
+
gem "aruba"
|
28
|
+
gem "jeweler", "~> 1.6.4"
|
29
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
aruba (0.4.11)
|
5
|
+
childprocess (>= 0.2.3)
|
6
|
+
cucumber (>= 1.1.1)
|
7
|
+
ffi (>= 1.0.11)
|
8
|
+
rspec (>= 2.7.0)
|
9
|
+
builder (3.0.0)
|
10
|
+
celluloid (0.15.2)
|
11
|
+
timers (~> 1.1.0)
|
12
|
+
celluloid-io (0.15.0)
|
13
|
+
celluloid (>= 0.15.0)
|
14
|
+
nio4r (>= 0.5.0)
|
15
|
+
childprocess (0.3.5)
|
16
|
+
ffi (~> 1.0, >= 1.0.6)
|
17
|
+
chunky_png (1.3.1)
|
18
|
+
coderay (1.1.0)
|
19
|
+
coffee-script (2.3.0)
|
20
|
+
coffee-script-source
|
21
|
+
execjs
|
22
|
+
coffee-script-source (1.7.1)
|
23
|
+
commonjs (0.2.7)
|
24
|
+
compass (1.0.0.alpha.21)
|
25
|
+
chunky_png (~> 1.2)
|
26
|
+
compass-core (~> 1.0.0.alpha.21)
|
27
|
+
compass-import-once (~> 1.0.4)
|
28
|
+
rb-fsevent (>= 0.9.3)
|
29
|
+
rb-inotify (>= 0.9)
|
30
|
+
sass (>= 3.3.0, < 3.5)
|
31
|
+
compass-core (1.0.0.alpha.21)
|
32
|
+
multi_json (~> 1.0)
|
33
|
+
sass (>= 3.3.0, < 3.5)
|
34
|
+
compass-import-once (1.0.4)
|
35
|
+
sass (>= 3.2, < 3.5)
|
36
|
+
cucumber (1.2.1)
|
37
|
+
builder (>= 2.1.2)
|
38
|
+
diff-lcs (>= 1.1.3)
|
39
|
+
gherkin (~> 2.11.0)
|
40
|
+
json (>= 1.4.6)
|
41
|
+
diff-lcs (1.1.3)
|
42
|
+
em-websocket (0.5.1)
|
43
|
+
eventmachine (>= 0.12.9)
|
44
|
+
http_parser.rb (~> 0.6.0)
|
45
|
+
eventmachine (1.0.3)
|
46
|
+
execjs (2.2.1)
|
47
|
+
ffi (1.1.5)
|
48
|
+
formatador (0.2.4)
|
49
|
+
gherkin (2.11.1)
|
50
|
+
json (>= 1.4.6)
|
51
|
+
git (1.2.5)
|
52
|
+
guard (2.6.0)
|
53
|
+
formatador (>= 0.2.4)
|
54
|
+
listen (~> 2.7)
|
55
|
+
lumberjack (~> 1.0)
|
56
|
+
pry (>= 0.9.12)
|
57
|
+
thor (>= 0.18.1)
|
58
|
+
guard-livereload (2.3.0)
|
59
|
+
em-websocket (~> 0.5)
|
60
|
+
guard (~> 2.0)
|
61
|
+
multi_json (~> 1.8)
|
62
|
+
hike (1.2.3)
|
63
|
+
http_parser.rb (0.6.0)
|
64
|
+
jeweler (1.6.4)
|
65
|
+
bundler (~> 1.0)
|
66
|
+
git (>= 1.2.5)
|
67
|
+
rake
|
68
|
+
json (1.8.1)
|
69
|
+
less (2.6.0)
|
70
|
+
commonjs (~> 0.2.7)
|
71
|
+
libv8 (3.16.14.3)
|
72
|
+
listen (2.7.1)
|
73
|
+
celluloid (>= 0.15.2)
|
74
|
+
celluloid-io (>= 0.15.0)
|
75
|
+
rb-fsevent (>= 0.9.3)
|
76
|
+
rb-inotify (>= 0.9)
|
77
|
+
lumberjack (1.0.5)
|
78
|
+
method_source (0.8.2)
|
79
|
+
multi_json (1.9.2)
|
80
|
+
nio4r (1.0.0)
|
81
|
+
pry (0.9.12.6)
|
82
|
+
coderay (~> 1.0)
|
83
|
+
method_source (~> 0.8)
|
84
|
+
slop (~> 3.4)
|
85
|
+
rack (1.5.2)
|
86
|
+
rake (0.9.2.2)
|
87
|
+
rb-fsevent (0.9.4)
|
88
|
+
rb-inotify (0.9.3)
|
89
|
+
ffi (>= 0.5.0)
|
90
|
+
ref (1.0.5)
|
91
|
+
rspec (2.11.0)
|
92
|
+
rspec-core (~> 2.11.0)
|
93
|
+
rspec-expectations (~> 2.11.0)
|
94
|
+
rspec-mocks (~> 2.11.0)
|
95
|
+
rspec-core (2.11.1)
|
96
|
+
rspec-expectations (2.11.2)
|
97
|
+
diff-lcs (~> 1.1.3)
|
98
|
+
rspec-mocks (2.11.2)
|
99
|
+
rubyzip (1.1.6)
|
100
|
+
sass (3.3.11)
|
101
|
+
slop (3.5.0)
|
102
|
+
sprockets (2.12.0)
|
103
|
+
hike (~> 1.2)
|
104
|
+
multi_json (~> 1.0)
|
105
|
+
rack (~> 1.0)
|
106
|
+
tilt (~> 1.1, != 1.3.0)
|
107
|
+
sprockets-sass (1.2.0)
|
108
|
+
sprockets (~> 2.0)
|
109
|
+
tilt (~> 1.1)
|
110
|
+
therubyracer (0.12.1)
|
111
|
+
libv8 (~> 3.16.14.0)
|
112
|
+
ref
|
113
|
+
thor (0.19.1)
|
114
|
+
tilt (1.4.1)
|
115
|
+
timers (1.1.0)
|
116
|
+
yui-compressor (0.12.0)
|
117
|
+
|
118
|
+
PLATFORMS
|
119
|
+
ruby
|
120
|
+
|
121
|
+
DEPENDENCIES
|
122
|
+
aruba
|
123
|
+
coffee-script (>= 2.3.0)
|
124
|
+
compass (>= 1.0.0.alpha.21)
|
125
|
+
cucumber
|
126
|
+
guard (>= 2.2.1)
|
127
|
+
guard-livereload (>= 2.0.0)
|
128
|
+
jeweler (~> 1.6.4)
|
129
|
+
json (>= 1.8.0)
|
130
|
+
less (>= 2.6.0)
|
131
|
+
rack (>= 1.5.2)
|
132
|
+
rb-fsevent (>= 0.9.3)
|
133
|
+
rspec
|
134
|
+
rubyzip (>= 1.0.0)
|
135
|
+
sass (>= 3.3.0)
|
136
|
+
sprockets (>= 2.12.0)
|
137
|
+
sprockets-sass (>= 1.2.0)
|
138
|
+
therubyracer (>= 0.12.0)
|
139
|
+
thor (>= 0.18.1)
|
140
|
+
yui-compressor (>= 0.12.0)
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Hardpixel
|
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.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
## Introduction
|
2
|
+
|
3
|
+
Marv is a toolkit for bootstrapping and developing WordPress themes using Sass, LESS, and CoffeeScript.
|
4
|
+
|
5
|
+
Current Version: **0.1.1**
|
6
|
+
|
7
|
+
-----
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Install Marv (requires [Ruby](http://www.ruby-lang.org/) and [RubyGems](http://rubygems.org/)):
|
12
|
+
|
13
|
+
$ gem install marv
|
14
|
+
|
15
|
+
|
16
|
+
## Get started
|
17
|
+
|
18
|
+
Create your new theme project:
|
19
|
+
|
20
|
+
$ marv create your_theme
|
21
|
+
|
22
|
+
Change to your new project directory:
|
23
|
+
|
24
|
+
$ cd your_theme
|
25
|
+
|
26
|
+
Link to your WordPress theme folder:
|
27
|
+
|
28
|
+
$ marv link /path/to/wordpress/wp-content/themes/your_theme
|
29
|
+
|
30
|
+
Watch for changes and start developing!
|
31
|
+
|
32
|
+
$ marv watch
|
33
|
+
|
34
|
+
Press Ctrl + Z to exit watch mode
|
35
|
+
|
36
|
+
Build your theme into the build_here directory:
|
37
|
+
|
38
|
+
$ marv build build_here
|
39
|
+
|
40
|
+
Package your theme as your_theme.zip:
|
41
|
+
|
42
|
+
$ marv package your_theme
|
43
|
+
|
44
|
+
|
45
|
+
## Help
|
46
|
+
|
47
|
+
Get a little help with the Marv commands:
|
48
|
+
|
49
|
+
$ marv help
|
data/Rakefile
ADDED
@@ -0,0 +1,54 @@
|
|
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 = "marv"
|
18
|
+
gem.executables = ["marv"]
|
19
|
+
gem.homepage = "https://github.com/hardpixel/marv"
|
20
|
+
gem.license = "MIT"
|
21
|
+
gem.summary = %Q{A tool for developing wordpress themes}
|
22
|
+
gem.description = %Q{A toolkit for bootstrapping and developing WordPress themes using Sass, LESS, and CoffeeScript.}
|
23
|
+
gem.email = "info@hardpixel.eu"
|
24
|
+
gem.authors = ["Hardpixel"]
|
25
|
+
# dependencies defined in Gemfile
|
26
|
+
gem.files.include Dir.glob('**/*')
|
27
|
+
end
|
28
|
+
Jeweler::RubygemsDotOrgTasks.new
|
29
|
+
|
30
|
+
require 'rspec/core'
|
31
|
+
require 'rspec/core/rake_task'
|
32
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
33
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
34
|
+
end
|
35
|
+
|
36
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
37
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
38
|
+
spec.rcov = true
|
39
|
+
end
|
40
|
+
|
41
|
+
require 'cucumber/rake/task'
|
42
|
+
Cucumber::Rake::Task.new(:features)
|
43
|
+
|
44
|
+
task :default => :spec
|
45
|
+
|
46
|
+
require 'rdoc/task'
|
47
|
+
RDoc::Task.new do |rdoc|
|
48
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
49
|
+
|
50
|
+
rdoc.rdoc_dir = 'rdoc'
|
51
|
+
rdoc.title = "marv #{version}"
|
52
|
+
rdoc.rdoc_files.include('README*')
|
53
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
54
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.2.0
|
data/bin/marv
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
require 'rubygems'
|
5
|
+
|
6
|
+
file_path = Pathname.new(__FILE__).realpath
|
7
|
+
libdir = File.join(File.dirname(File.dirname(file_path)), "lib")
|
8
|
+
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
9
|
+
|
10
|
+
require 'marv'
|
11
|
+
|
12
|
+
Marv::CLI.start
|
@@ -0,0 +1,38 @@
|
|
1
|
+
Given /^I am in a marv project named "([^"]*)"$/ do |name|
|
2
|
+
cli = Marv::CLI.new
|
3
|
+
|
4
|
+
cli.shell.mute do
|
5
|
+
Marv::Project.create(File.join(current_dir, name), {:name => name}, cli)
|
6
|
+
end
|
7
|
+
|
8
|
+
cd name
|
9
|
+
end
|
10
|
+
|
11
|
+
Given /^a WordPress installation exists at "([^"]*)"$/ do |directory|
|
12
|
+
create_dir directory
|
13
|
+
end
|
14
|
+
|
15
|
+
Then /^the file "([^"]*)" should contain:$/ do |filename, content_partials|
|
16
|
+
content_partials.raw.each do |content|
|
17
|
+
check_file_content(filename, content[0], true)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
Then /^the marv skeleton should be created in directory "([^"]*)"$/ do |base_dir|
|
22
|
+
skeleton_dirs = [
|
23
|
+
['assets', 'images'],
|
24
|
+
['assets', 'javascripts'],
|
25
|
+
['assets', 'stylesheets'],
|
26
|
+
|
27
|
+
['functions'],
|
28
|
+
|
29
|
+
['templates', 'core'],
|
30
|
+
['templates', 'custom', 'pages'],
|
31
|
+
['templates', 'custom', 'partials']
|
32
|
+
]
|
33
|
+
|
34
|
+
skeleton_dirs.each do |skeleton_dir|
|
35
|
+
full_path = File.join(base_dir, skeleton_dir)
|
36
|
+
check_directory_presence([full_path], true)
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
begin
|
3
|
+
Bundler.setup(:default, :development)
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
$stderr.puts e.message
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
+
exit e.status_code
|
8
|
+
end
|
9
|
+
|
10
|
+
file_path = Pathname.new(__FILE__).realpath
|
11
|
+
libdir = File.join(File.dirname(File.dirname(File.dirname(file_path))), "lib")
|
12
|
+
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
13
|
+
|
14
|
+
require 'marv'
|
15
|
+
|
16
|
+
require 'rspec/expectations'
|
17
|
+
require 'aruba/cucumber'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# WordPress theme information is stored in source/assets/stylesheets/_header.scss as of Marv version 0.5
|
2
|
+
|
3
|
+
# JavaScript compression
|
4
|
+
# config[:compress_js] = false
|
5
|
+
|
6
|
+
# Enable livereload
|
7
|
+
# config[:livereload] = false
|
8
|
+
|
9
|
+
# Compass configuration can also go here.
|
10
|
+
# See http://compass-style.org/help/tutorials/configuration-reference/ for some of the options
|
11
|
+
# Note: Most options (especially path-related options) will have no effect on Marv
|
12
|
+
|
13
|
+
# Compass.configuration do |compass|
|
14
|
+
# compass.line_comments = true
|
15
|
+
# compass.output_style = :expanded # use :compressed for minified version
|
16
|
+
# end
|
17
|
+
|
18
|
+
# You can also include additional Compass frameworks by requiring them:
|
19
|
+
# require 'stitch'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
add_action( 'wp_enqueue_scripts', '<%= theme_id %>_enqueue_scripts' );
|
4
|
+
|
5
|
+
if ( ! function_exists( '<%= theme_id %>_enqueue_scripts' ) ) :
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Add theme styles and scripts here
|
9
|
+
*/
|
10
|
+
function <%= theme_id %>_enqueue_scripts() {
|
11
|
+
|
12
|
+
if ( ! is_admin() ) {
|
13
|
+
wp_enqueue_style(
|
14
|
+
'<%= theme_id %>-style',
|
15
|
+
get_bloginfo( 'stylesheet_url' )
|
16
|
+
);
|
17
|
+
}
|
18
|
+
|
19
|
+
}
|
20
|
+
|
21
|
+
endif; // <%= theme_id %>_enqueue_scripts
|
22
|
+
|
23
|
+
add_action( 'after_setup_theme', '<%= theme_id %>_setup' );
|
24
|
+
|
25
|
+
if ( ! function_exists( '<%= theme_id %>_setup' ) ) :
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Set up your theme here
|
29
|
+
*/
|
30
|
+
function <%= theme_id %>_setup() {
|
31
|
+
add_theme_support( 'post-thumbnails' );
|
32
|
+
}
|
33
|
+
|
34
|
+
endif; // <%= theme_id %>_setup
|