Skip to content

Commit 83a5572

Browse files
committed
- Change icons
1 parent 7036414 commit 83a5572

16 files changed

Lines changed: 136 additions & 66 deletions

Runfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ action :css do |args|
2424
end
2525
end
2626

27+
help "Generate rouge CSS"
28+
action :rouge do
29+
puts 'Saving app/styles/_rouge.scss'
30+
exec 'bundle exec rougify style github > app/styles/_rouge.scss'
31+
end
32+
2733
usage "(server|s) [--sample]"
2834
help "Run server with spec docroot or the sample docroot"
2935
option "-s, --sample", "Use the 'sample' folder instead of the fixture"

Runfile.bak

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
require_relative 'lib/madness'
2+
require "sasstool"
3+
require "slim"
4+
require "pretty_trace/enable-trim"
5+
require "runfile-tasks"
6+
7+
title "Madness Runfile"
8+
summary "Runfile tasks for building the Madness gem"
9+
version Madness::VERSION
10+
11+
RunfileTasks::RubyGems.all 'madness'
12+
RunfileTasks::Testing.rspec
13+
14+
help "Generate public CSS"
15+
usage 'css [--watch]'
16+
option '-w, --watch', 'Watch for changes and regenerate'
17+
action :css do |args|
18+
if args['--watch']
19+
exec "filewatcher --immediate 'app/styles/*.scss' 'bundle exec run css'"
20+
else
21+
target = "app/public/css"
22+
Sasstool::Renderer.new("app/styles/main.scss").save target
23+
puts "Saved #{target}"
24+
end
25+
end
26+
27+
usage "(server|s) [--sample]"
28+
help "Run server with spec docroot or the sample docroot"
29+
option "-s, --sample", "Use the 'sample' folder instead of the fixture"
30+
action :server, :s do |args|
31+
folder = args['--sample'] ? 'sample' : 'spec/fixtures/docroot'
32+
system "bundle exec bin/madness #{folder}"
33+
end
34+
35+
help 'Extract fontello zip'
36+
action :fontello do
37+
system 'mkdir -p tmp/fontello'
38+
zip = 'assets/fontello.zip'
39+
system "unzip -j -o #{zip} -d tmp/fontello"
40+
%w[eot svg ttf woff woff2].each do |ext|
41+
system "cp tmp/fontello/fontello.#{ext} app/public/font/"
42+
end
43+
44+
system 'cp tmp/fontello/fontello.css app/styles/_fontello.scss'
45+
end
46+
47+
help "Generate changelog and append old changelog"
48+
action :changelog do
49+
system "git changelog --save"
50+
# append older changelog (prior to switching to git-changelog)
51+
system "cat .changelog.old.md >> CHANGELOG.md"
52+
end
53+
54+
help "Count lines of code"
55+
action :cloc do
56+
system "cloc . --exclude-dir coverage,spec,examples"
57+
end
58+
59+
help "Generate the screenshots animated gif"
60+
action :screenshots do
61+
puts "Saving assets/screenshots.gif"
62+
exec "convert -delay 300 -loop 0 assets/screenshots/*.png assets/screenshots.gif"
63+
end
64+
65+
help "Generate the site to /docs"
66+
action :site do
67+
# Use the README as a base, and do some TOC acrobatics to prevent the HTML
68+
# generator from converting some TOC comments.
69+
readme = File.read('README.md')
70+
.gsub('<!-- TOC -->', '{{TOC_COMMENT}}')
71+
.gsub('<!-- MADNESS_TOC -->', '<!-- TOC -->')
72+
.sub(/\[!\[Gem Version\].*/, '')
73+
.sub(/\[!\[Build Status\].*/, '')
74+
.sub(/\[!\[Maintainability\].*/, '')
75+
76+
# Create the Madness page using Madness
77+
content = Madness::MarkdownDocument.new(readme)
78+
.to_html
79+
.gsub '{{TOC_COMMENT}}', '&lt;!-- TOC --&gt;'
80+
81+
# Place the rendered HTML inside a slim template
82+
Slim::Engine.set_options pretty: true
83+
html = Slim::Template.new("assets/site/index.slim").render(nil, content: content)
84+
85+
# Export for GitHub pages
86+
File.write 'docs/index.html', html
87+
puts 'Saved docs/index.html'
88+
end
89+
90+
require_relative 'debug.rb' if File.exist? 'debug.rb'

app/public/font/fontello.eot

6.18 KB
Binary file not shown.

app/public/font/fontello.svg

Lines changed: 16 additions & 0 deletions
Loading

app/public/font/fontello.ttf

6.01 KB
Binary file not shown.

app/public/font/fontello.woff

3.47 KB
Binary file not shown.

app/public/font/fontello.woff2

2.75 KB
Binary file not shown.

app/public/fonts/fontello.eot

-5.35 KB
Binary file not shown.

app/public/fonts/fontello.svg

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/public/fonts/fontello.ttf

-5.18 KB
Binary file not shown.

0 commit comments

Comments
 (0)