muwu 3.0.0.alpha → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/{muwu_loader.rb → loader.rb} +2 -2
- data/lib/muwu.rb +3 -3
- data/lib/muwu/cli/cli.rb +33 -22
- data/lib/muwu/cli/help/compile +4 -4
- data/lib/muwu/cli/help/publish +19 -6
- data/lib/muwu/cli/help/reset +5 -2
- data/lib/muwu/cli/help/summary +4 -4
- data/lib/muwu/cli/help/sync +23 -15
- data/lib/muwu/cli/help/view +3 -0
- data/lib/muwu/controller/controller.rb +65 -30
- data/lib/muwu/controller/controller_interaction.rb +66 -44
- data/lib/muwu/default/default.rb +12 -9
- data/lib/muwu/destination/destination.rb +61 -57
- data/lib/muwu/destination_builder/destination_builder.rb +31 -33
- data/lib/muwu/manifest_task_builder/text_item_builder.rb +1 -8
- data/lib/muwu/project/project.rb +146 -127
- data/lib/muwu/project_builder/assets/config/css/base/html_elements.scss +19 -15
- data/lib/muwu/project_builder/assets/config/css/base/mixin_text_section_heading.scss +12 -11
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_contents.scss +5 -5
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_metadata.scss +2 -4
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_navigator.scss +3 -4
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_subcontents.scss +5 -5
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_text.scss +16 -15
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_title.scss +9 -6
- data/lib/muwu/project_builder/project_reader.rb +1 -0
- data/lib/muwu/project_builder/project_reset_compiled.rb +31 -0
- data/lib/muwu/project_builder/project_reset_css.rb +30 -30
- data/lib/muwu/project_builder/project_starter.rb +7 -7
- data/lib/muwu/project_builder/project_validator.rb +14 -4
- data/lib/muwu/project_builder/project_writer.rb +12 -11
- data/lib/muwu/project_exception/compiled_folder_not_found.rb +23 -0
- data/lib/muwu/project_exception/lynx_not_available.rb +23 -0
- data/lib/muwu/project_exception_handler/fatal.rb +10 -9
- data/lib/muwu/project_options/project_options.rb +9 -8
- data/lib/muwu/project_options_builder/project_option_validator.rb +12 -12
- data/lib/muwu/project_options_builder/project_option_validator_value.rb +78 -82
- data/lib/muwu/publish/publish.rb +42 -34
- data/lib/muwu/render_concat/render_concat.rb +26 -27
- data/lib/muwu/render_html/render_html.rb +27 -24
- data/lib/muwu/render_html_partial/render_document_html.rb +64 -64
- data/lib/muwu/render_html_partial/render_text_item.rb +16 -16
- data/lib/muwu/sync/sync.rb +40 -36
- data/lib/muwu/var/deflistdiv.rb +0 -0
- data/lib/muwu/viewer/viewer.rb +25 -0
- data/test/what_no_tests.md +1 -3
- metadata +16 -11
@@ -17,16 +17,19 @@
|
|
17
17
|
// proportional, while the content box could shrink). An HTML document with
|
18
18
|
// adequately-defined heirarchial organization has no need for `padding-box`
|
19
19
|
// sizing, and a layout editor working with a mindset of variable-size media
|
20
|
-
// can successfully rely on `content-box` sizing.
|
20
|
+
// can successfully rely on `content-box` sizing.
|
21
21
|
//
|
22
22
|
|
23
|
+
$muwu-root-font-size: 1rem;
|
24
|
+
$muwu-root-line-height: ($muwu-root-font-size * 1.16667);
|
25
|
+
|
23
26
|
* {
|
24
27
|
box-sizing: content-box;
|
25
|
-
|
28
|
+
font-size: $muwu-root-font-size;
|
29
|
+
line-height: $muwu-root-line-height;
|
26
30
|
margin: 0;
|
27
31
|
padding: 0;
|
28
32
|
text-indent: 0;
|
29
|
-
font-size: 1rem;
|
30
33
|
}
|
31
34
|
|
32
35
|
|
@@ -41,16 +44,16 @@ body {
|
|
41
44
|
}
|
42
45
|
|
43
46
|
blockquote {
|
44
|
-
margin:
|
47
|
+
margin: $muwu-root-line-height 2rem;
|
45
48
|
}
|
46
49
|
|
47
50
|
code {
|
48
|
-
font-size:
|
51
|
+
font-size: $muwu-root-font-size;
|
49
52
|
padding: 0rem 0.15rem;
|
50
53
|
}
|
51
54
|
|
52
55
|
dl {
|
53
|
-
margin:
|
56
|
+
margin: $muwu-root-line-height 0;
|
54
57
|
div {
|
55
58
|
dt {
|
56
59
|
display: list-item;
|
@@ -63,7 +66,7 @@ dl {
|
|
63
66
|
dd {
|
64
67
|
display: list-item;
|
65
68
|
list-style-type: none;
|
66
|
-
p {
|
69
|
+
p {
|
67
70
|
display: inline;
|
68
71
|
}
|
69
72
|
}
|
@@ -77,30 +80,31 @@ img {
|
|
77
80
|
}
|
78
81
|
|
79
82
|
h1, h2, h3, h4, h5, h6 {
|
80
|
-
font-size: 1.
|
83
|
+
font-size: ($muwu-root-font-size * 1.125);
|
84
|
+
margin: $muwu-root-line-height 0rem;
|
81
85
|
}
|
82
86
|
|
83
87
|
hr {
|
84
|
-
margin:
|
88
|
+
margin: $muwu-root-line-height 0;
|
85
89
|
border-width: 0;
|
86
90
|
}
|
87
91
|
|
88
92
|
ol {
|
89
|
-
margin:
|
93
|
+
margin: $muwu-root-line-height;
|
90
94
|
ol, ul {
|
91
95
|
margin: 0rem 1rem;
|
92
96
|
}
|
93
97
|
}
|
94
98
|
|
95
99
|
p {
|
96
|
-
margin:
|
100
|
+
margin: $muwu-root-line-height 0rem;
|
97
101
|
}
|
98
102
|
|
99
103
|
pre {
|
100
|
-
font-size: 0.
|
101
|
-
margin:
|
104
|
+
font-size: ($muwu-root-font-size * 0.9);
|
105
|
+
margin: $muwu-root-line-height 0;
|
102
106
|
>code {
|
103
|
-
font-size: 0.
|
107
|
+
font-size: ($muwu-root-font-size * 0.8);
|
104
108
|
padding: 0rem 0rem;
|
105
109
|
}
|
106
110
|
}
|
@@ -110,7 +114,7 @@ q {
|
|
110
114
|
}
|
111
115
|
|
112
116
|
ul {
|
113
|
-
margin:
|
117
|
+
margin: $muwu-root-line-height;
|
114
118
|
ol, ul {
|
115
119
|
margin: 0rem 1rem;
|
116
120
|
}
|
@@ -1,7 +1,17 @@
|
|
1
1
|
@mixin text_section_heading($font-size, $margin-bottom) {
|
2
|
-
|
2
|
+
>h1:first-child,
|
3
|
+
>h2:first-child,
|
4
|
+
>h3:first-child,
|
5
|
+
>h4:first-child,
|
6
|
+
>h5:first-child,
|
7
|
+
>h6:first-child {
|
8
|
+
font-size: $font-size;
|
9
|
+
margin-bottom: $margin-bottom;
|
10
|
+
}
|
11
|
+
>h1.section_number {
|
3
12
|
font-size: $font-size;
|
4
|
-
|
13
|
+
margin-bottom: 0;
|
14
|
+
& + h1:nth-of-type(2),
|
5
15
|
& + h2:first-of-type,
|
6
16
|
& + h3:first-of-type,
|
7
17
|
& + h4:first-of-type,
|
@@ -11,13 +21,4 @@
|
|
11
21
|
margin-bottom: $margin-bottom;
|
12
22
|
}
|
13
23
|
}
|
14
|
-
>h1:first-child,
|
15
|
-
>h2:first-child,
|
16
|
-
>h3:first-child,
|
17
|
-
>h4:first-child,
|
18
|
-
>h5:first-child,
|
19
|
-
>h6:first-child {
|
20
|
-
font-size: $font-size;
|
21
|
-
margin-bottom: $margin-bottom;
|
22
|
-
}
|
23
24
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
body >div.contents {
|
2
|
-
margin:
|
2
|
+
margin: ($muwu-root-line-height * 4) 0;
|
3
3
|
>h1 {
|
4
|
-
font-size: 1.
|
5
|
-
margin: 0 0
|
4
|
+
font-size: ($muwu-root-font-size * 1.25);
|
5
|
+
margin: 0 0 ($muwu-root-line-height * 2) 0;
|
6
6
|
text-align: left;
|
7
7
|
}
|
8
8
|
.compiler_warning {
|
@@ -33,7 +33,7 @@ body >div.contents {
|
|
33
33
|
}
|
34
34
|
td.heading {
|
35
35
|
text-align: left;
|
36
|
-
}
|
36
|
+
}
|
37
37
|
td.number {
|
38
38
|
text-align: right;
|
39
39
|
}
|
@@ -44,7 +44,7 @@ body >div.contents {
|
|
44
44
|
display: block;
|
45
45
|
margin: 0rem;
|
46
46
|
li {
|
47
|
-
margin: 0.
|
47
|
+
margin: ($muwu-root-line-height * 0.5) 0rem;
|
48
48
|
a {
|
49
49
|
display: inline;
|
50
50
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
body >div.metadata {
|
2
|
-
margin:
|
2
|
+
margin: ($muwu-root-line-height * 4) 0;
|
3
3
|
dl {
|
4
4
|
div {
|
5
|
-
margin:
|
5
|
+
margin: $muwu-root-line-height 0;
|
6
6
|
dt {
|
7
7
|
font-weight: bold;
|
8
8
|
display: block;
|
@@ -13,5 +13,3 @@ body >div.metadata {
|
|
13
13
|
}
|
14
14
|
}
|
15
15
|
}
|
16
|
-
|
17
|
-
|
@@ -1,13 +1,12 @@
|
|
1
1
|
body >div.navigator {
|
2
|
-
margin: 0.
|
2
|
+
margin: ($muwu-root-line-height * 0.5) 0;
|
3
3
|
nav.document_links {
|
4
4
|
width: 100%;
|
5
5
|
display: flex;
|
6
6
|
justify-content: space-around;
|
7
7
|
a.document_link {
|
8
|
-
font-size: 0.
|
9
|
-
padding: 0.
|
8
|
+
font-size: ($muwu-root-font-size * 0.8);
|
9
|
+
padding: ($muwu-root-line-height * 0.5);
|
10
10
|
}
|
11
11
|
}
|
12
12
|
}
|
13
|
-
|
@@ -1,8 +1,8 @@
|
|
1
1
|
body >div.subcontents {
|
2
|
-
margin:
|
2
|
+
margin: ($muwu-root-line-height * 4) 0;
|
3
3
|
>h1 {
|
4
|
-
font-size: 1.
|
5
|
-
margin: 0 0
|
4
|
+
font-size: ($muwu-root-font-size * 1.75);
|
5
|
+
margin: 0 0 ($muwu-root-line-height * 2) 0;
|
6
6
|
text-align: left;
|
7
7
|
}
|
8
8
|
.compiler_warning {
|
@@ -33,7 +33,7 @@ body >div.subcontents {
|
|
33
33
|
}
|
34
34
|
td.heading {
|
35
35
|
text-align: left;
|
36
|
-
}
|
36
|
+
}
|
37
37
|
td.number {
|
38
38
|
text-align: right;
|
39
39
|
}
|
@@ -44,7 +44,7 @@ body >div.subcontents {
|
|
44
44
|
display: block;
|
45
45
|
margin: 0rem 0.5rem;
|
46
46
|
li {
|
47
|
-
margin: 0.
|
47
|
+
margin: ($muwu-root-line-height * 0.5) 0rem;
|
48
48
|
a {
|
49
49
|
display: inline;
|
50
50
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@import 'mixin_text_section_heading';
|
2
2
|
|
3
3
|
body >div.text {
|
4
|
-
margin:
|
4
|
+
margin: ($muwu-root-line-height * 6) 0rem;
|
5
5
|
ol {
|
6
6
|
padding-left: 1rem;
|
7
7
|
}
|
@@ -9,40 +9,41 @@ body >div.text {
|
|
9
9
|
padding-left: 1rem;
|
10
10
|
}
|
11
11
|
|
12
|
-
section[data-section_depth] {
|
12
|
+
section[data-section_depth] {
|
13
13
|
>.section_number {
|
14
14
|
font-weight: bold;
|
15
15
|
display: block;
|
16
|
+
margin-bottom: none;
|
16
17
|
text-decoration: none;
|
17
18
|
}
|
18
19
|
nav.document_links {
|
19
20
|
width: 100%;
|
20
|
-
margin:
|
21
|
+
margin: ($muwu-root-line-height * 2) 0rem ($muwu-root-line-height * 4) 0rem;
|
21
22
|
text-align: right;
|
22
23
|
a.document_link {
|
23
|
-
font-size: 0.
|
24
|
+
font-size: ($muwu-root-font-size * 0.75);
|
24
25
|
margin: 0rem 0.5rem
|
25
26
|
}
|
26
27
|
}
|
27
28
|
}
|
28
|
-
|
29
|
+
|
29
30
|
section[data-section_depth='1'] {
|
30
|
-
margin:
|
31
|
-
@include text_section_heading(1.
|
31
|
+
margin: ($muwu-root-line-height * 6) 0;
|
32
|
+
@include text_section_heading(($muwu-root-font-size * 1.5), ($muwu-root-line-height * 2));
|
32
33
|
}
|
33
|
-
|
34
|
+
|
34
35
|
section[data-section_depth='2'] {
|
35
|
-
margin:
|
36
|
-
@include text_section_heading(1.
|
36
|
+
margin: ($muwu-root-line-height * 4) 0;
|
37
|
+
@include text_section_heading(($muwu-root-font-size * 1.375), ($muwu-root-line-height * 1.5));
|
37
38
|
}
|
38
39
|
|
39
40
|
section[data-section_depth='3'] {
|
40
|
-
margin:
|
41
|
-
@include text_section_heading(1.
|
41
|
+
margin: ($muwu-root-line-height * 2) 0;
|
42
|
+
@include text_section_heading(($muwu-root-font-size * 1.25), ($muwu-root-line-height * 1.5));
|
42
43
|
section[data-section_depth] {
|
43
|
-
margin:
|
44
|
-
@include text_section_heading(
|
44
|
+
margin: ($muwu-root-line-height * 2) 0;
|
45
|
+
@include text_section_heading(($muwu-root-font-size * 1), ($muwu-root-line-height * 1.5));
|
45
46
|
}
|
46
47
|
}
|
47
48
|
|
48
|
-
}
|
49
|
+
}
|
@@ -1,20 +1,23 @@
|
|
1
1
|
body >div.title {
|
2
|
-
margin:
|
2
|
+
margin: ($muwu-root-line-height * 4) 0;
|
3
3
|
text-align: left;
|
4
4
|
h1 {
|
5
5
|
display: block;
|
6
6
|
font-weight: bold;
|
7
|
-
margin: 0.
|
7
|
+
margin: ($muwu-root-line-height * 0.5) 0;
|
8
8
|
}
|
9
9
|
[data-metadata_key='title'] {
|
10
|
-
font-size: 2
|
10
|
+
font-size: ($muwu-root-font-size * 2);
|
11
|
+
line-height: ($muwu-root-line-height * 2);
|
11
12
|
}
|
12
13
|
[data-metadata_key='subtitle'] {
|
13
|
-
font-size: 1.
|
14
|
+
font-size: ($muwu-root-font-size * 1.5);
|
15
|
+
line-height: ($muwu-root-line-height * 1.5);
|
14
16
|
}
|
15
17
|
[data-metadata_key='author'] {
|
16
|
-
|
17
|
-
|
18
|
+
font-size: ($muwu-root-font-size * 1.25);
|
19
|
+
line-height: ($muwu-root-line-height * 1.25);
|
20
|
+
margin: ($muwu-root-line-height * 2) 0rem;
|
18
21
|
}
|
19
22
|
h1:first-child {
|
20
23
|
margin-top: 0;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Muwu
|
2
|
+
class ProjectResetCompiled
|
3
|
+
|
4
|
+
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
|
8
|
+
include Muwu
|
9
|
+
|
10
|
+
|
11
|
+
def initialize(project)
|
12
|
+
@project = project
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
public
|
17
|
+
|
18
|
+
|
19
|
+
def reset_compiled
|
20
|
+
puts "- Resetting #{@project.path_compiled}"
|
21
|
+
begin
|
22
|
+
FileUtils.remove_entry_secure(@project.path_compiled)
|
23
|
+
rescue Errno::ENOENT
|
24
|
+
ensure
|
25
|
+
FileUtils.mkdir(@project.path_compiled)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -1,21 +1,21 @@
|
|
1
1
|
module Muwu
|
2
2
|
class ProjectResetCss
|
3
|
-
|
4
|
-
|
3
|
+
|
4
|
+
|
5
5
|
include Muwu
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
|
8
8
|
require 'fileutils'
|
9
|
-
|
10
|
-
|
9
|
+
|
10
|
+
|
11
11
|
def initialize(project)
|
12
12
|
@project = project
|
13
13
|
end
|
14
|
-
|
15
|
-
|
14
|
+
|
15
|
+
|
16
16
|
public
|
17
|
-
|
18
|
-
|
17
|
+
|
18
|
+
|
19
19
|
def reset_css
|
20
20
|
phase_1_verify_or_create_css_folder
|
21
21
|
phase_2_clear_base_folder
|
@@ -25,8 +25,8 @@ module Muwu
|
|
25
25
|
phase_6_copy_index
|
26
26
|
phase_7_verify_or_create_extensions_folder
|
27
27
|
end
|
28
|
-
|
29
|
-
|
28
|
+
|
29
|
+
|
30
30
|
def phase_1_verify_or_create_css_folder
|
31
31
|
if Dir.exists?(@project.path_config) == false
|
32
32
|
puts "Creating folder #{@project.path_config}"
|
@@ -37,50 +37,50 @@ module Muwu
|
|
37
37
|
FileUtils.mkdir(@project.path_css)
|
38
38
|
end
|
39
39
|
end
|
40
|
-
|
41
|
-
|
40
|
+
|
41
|
+
|
42
42
|
def phase_2_clear_base_folder
|
43
43
|
if Dir.exists?(@project.path_css_base) == true
|
44
44
|
puts "Clearing folder #{@project.path_css_base}"
|
45
|
-
FileUtils.
|
45
|
+
FileUtils.remove_entry_secure(@project.path_css_base)
|
46
46
|
end
|
47
47
|
end
|
48
|
-
|
49
|
-
|
48
|
+
|
49
|
+
|
50
50
|
def phase_3_copy_base_css_files
|
51
51
|
folder_source_gem = File.absolute_path(File.join(Muwu::GEM_HOME_LIB, 'muwu','project_builder','assets','config','css','base'))
|
52
52
|
folder_destination_project = @project.path_css_base
|
53
53
|
puts "Resetting folder #{@project.path_css_base}"
|
54
54
|
FileUtils.cp_r(folder_source_gem, folder_destination_project)
|
55
55
|
end
|
56
|
-
|
57
|
-
|
56
|
+
|
57
|
+
|
58
58
|
def phase_4_verify_or_create_colors_folder
|
59
59
|
if Dir.exists?(@project.path_css_colors) == false
|
60
60
|
puts "Creating folder #{@project.path_css_colors}"
|
61
61
|
FileUtils.mkdir(@project.path_css_colors)
|
62
62
|
end
|
63
63
|
end
|
64
|
-
|
65
|
-
|
64
|
+
|
65
|
+
|
66
66
|
def phase_5_copy_colors_css_files
|
67
67
|
colors_source_gem = File.absolute_path(File.join(Muwu::GEM_HOME_LIB, 'muwu','project_builder','assets','config','css','colors','.'))
|
68
68
|
colors_destination_project = @project.path_css
|
69
69
|
puts "Resetting file #{File.join(@project.path_css_colors,'dark.scss')}"
|
70
|
-
puts "Resetting file #{File.join(@project.path_css_colors,'
|
71
|
-
puts "Resetting file #{File.join(@project.path_css_colors,'
|
70
|
+
puts "Resetting file #{File.join(@project.path_css_colors,'index.scss')}"
|
71
|
+
puts "Resetting file #{File.join(@project.path_css_colors,'light.scss')}"
|
72
72
|
FileUtils.cp_r(colors_source_gem, colors_destination_project)
|
73
73
|
end
|
74
|
-
|
75
|
-
|
74
|
+
|
75
|
+
|
76
76
|
def phase_6_copy_index
|
77
77
|
index_source_gem = File.absolute_path(File.join(Muwu::GEM_HOME_LIB, 'muwu','project_builder','assets','config','css','index.scss'))
|
78
78
|
index_destination_project = @project.path_css
|
79
79
|
puts "Resetting file #{File.join(@project.path_css, 'index.scss')}"
|
80
80
|
FileUtils.cp_r(index_source_gem, index_destination_project)
|
81
81
|
end
|
82
|
-
|
83
|
-
|
82
|
+
|
83
|
+
|
84
84
|
def phase_7_verify_or_create_extensions_folder
|
85
85
|
if Dir.exists?(@project.path_css_extensions) == false
|
86
86
|
folder_source_gem = File.absolute_path(File.join(Muwu::GEM_HOME_LIB, 'muwu','project_builder','assets','config','css','extensions'))
|
@@ -89,7 +89,7 @@ module Muwu
|
|
89
89
|
FileUtils.cp_r(folder_source_gem, folder_destination_project)
|
90
90
|
end
|
91
91
|
end
|
92
|
-
|
93
|
-
|
92
|
+
|
93
|
+
|
94
94
|
end
|
95
|
-
end
|
95
|
+
end
|