Skip to content

Commit 5c3ab10

Browse files
committed
optimized docket generator
1 parent 16b0696 commit 5c3ab10

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

docset/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
assets
2+
openwebicons.docset

docset/openwebicons.rb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
# path to store assets
1010
ASSETS_DIR = File.join(ROOT_DIR, "docset", "assets")
1111

12+
FileUtils.mkdir_p(ASSETS_DIR)
13+
FileUtils.mkdir_p(File.join(ASSETS_DIR, 'font'))
14+
FileUtils.mkdir_p(File.join(ASSETS_DIR, 'css'))
15+
1216
# Copy Assets to assets/
1317
FileUtils.cp File.join(ROOT_DIR, 'css', 'openwebicons.css'), File.join(ASSETS_DIR, 'css/')
1418
FileUtils.cp File.join(ROOT_DIR, 'font', 'openwebicons.eot'), File.join(ASSETS_DIR, 'font/')
@@ -38,7 +42,7 @@
3842
style <<-EOS
3943
@import 'assets/css/openwebicons.css';
4044
41-
[class^="icon-"]:before, [class*=" icon-"]:before {
45+
[class^="openwebicons-"]:before, [class*=" openwebicons-"]:before {
4246
font-size: 40px;
4347
}
4448
EOS
@@ -49,11 +53,11 @@
4953
icons.each do |icon|
5054
entry do
5155
name icon.children.first.value.to_s
52-
command "icon-#{icon.children.first.value.to_s}"
53-
td_notes "<i class='icon-#{icon.children.first.value.to_s}'></i>"
56+
command "openwebicons-#{icon.children.first.value.to_s}"
57+
td_notes "<i class='openwebicons-#{icon.children.first.value.to_s}'></i>"
5458
td_notes <<-EOS
5559
```html
56-
<i class='icon-#{icon.children.first.value.to_s}'></i>
60+
<i class='openwebicons-#{icon.children.first.value.to_s}'></i>
5761
```
5862
EOS
5963
end
@@ -67,11 +71,11 @@
6771
if not icon.children[2].value.to_s == "\"monochrome\""
6872
entry do
6973
name "#{icon.children.first.value.to_s}"
70-
command "icon-#{icon.children.first.value.to_s}-colored"
71-
td_notes "<i class='icon-#{icon.children.first.value.to_s}-colored'></i>"
74+
command "openwebicons-#{icon.children.first.value.to_s}-colored"
75+
td_notes "<i class='openwebicons-#{icon.children.first.value.to_s}-colored'></i>"
7276
td_notes <<-EOS
7377
```html
74-
<i class="icon-#{icon.children.first.value.to_s}-colored"></i>
78+
<i class="openwebicons-#{icon.children.first.value.to_s}-colored"></i>
7579
```
7680
EOS
7781
end

0 commit comments

Comments
 (0)