momaker 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/lib/momaker/version.rb +1 -1
- data/lib/momaker.rb +8 -13
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e26c54594aa4bdd1e103ac3ae447816a2575aff0
|
|
4
|
+
data.tar.gz: ced1324fc276c0c7efacd499e5b6e8f5cbdd3aac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0aa0cd7955733b82142a3fddf48249740db771f71b3720aaf8217b7f871439738317fc3ba63a92bfd5f69da55228936ba917bf5b668f0de743e5a49693401ea4
|
|
7
|
+
data.tar.gz: 3df20d2c65082270b56994830eccb9a4435703c1e8bcdd0db707c52dc104b95427d3248a0ed8c87a97248c9188db732e641eb87115f3c999e2a2e473d77b89de
|
data/lib/momaker/version.rb
CHANGED
data/lib/momaker.rb
CHANGED
|
@@ -11,6 +11,7 @@ module Momaker
|
|
|
11
11
|
.tr("_", "-")
|
|
12
12
|
.tr(" ", "-")
|
|
13
13
|
.downcase!
|
|
14
|
+
str
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def self.create_module_directory(path)
|
|
@@ -24,7 +25,6 @@ module Momaker
|
|
|
24
25
|
file.write(".#{name} {}" + "\n\n")
|
|
25
26
|
|
|
26
27
|
if @module_submodules.length
|
|
27
|
-
|
|
28
28
|
# Elements
|
|
29
29
|
@module_submodules.each do |submodule|
|
|
30
30
|
file.write(".#{name}__#{submodule[:element]} {}")
|
|
@@ -41,7 +41,9 @@ module Momaker
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def self.start(command, module_type, module_name, remaining_arguments)
|
|
44
|
-
|
|
44
|
+
p module_name
|
|
45
|
+
@module_name = hyphenize(module_name)
|
|
46
|
+
p @module_name
|
|
45
47
|
@module_submodules = []
|
|
46
48
|
|
|
47
49
|
if remaining_arguments
|
|
@@ -62,16 +64,9 @@ module Momaker
|
|
|
62
64
|
end
|
|
63
65
|
|
|
64
66
|
if command.downcase == "generate" || command.downcase == "g"
|
|
65
|
-
unless module_name
|
|
66
|
-
puts "What would you like to call your #{module_type}?"
|
|
67
|
-
print "> "
|
|
68
|
-
module_name = hyphenize(STDIN.gets.chomp().strip)
|
|
69
|
-
end
|
|
70
67
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
print "> "
|
|
74
|
-
end
|
|
68
|
+
puts "Create #{module_type} called #{@module_name}? Y/N"
|
|
69
|
+
print "> "
|
|
75
70
|
|
|
76
71
|
if STDIN.gets.chomp().downcase == "y"
|
|
77
72
|
module_path = "#{@config_options[:path]}/#{module_type}"
|
|
@@ -79,9 +74,9 @@ module Momaker
|
|
|
79
74
|
if module_path
|
|
80
75
|
create_module_directory(module_path)
|
|
81
76
|
|
|
82
|
-
if create_module(module_path, module_name)
|
|
77
|
+
if create_module(module_path, @module_name)
|
|
83
78
|
puts "Generated your new module:"
|
|
84
|
-
puts "#{module_path}/_#{module_name}.scss"
|
|
79
|
+
puts "#{module_path}/_#{@module_name}.scss"
|
|
85
80
|
end
|
|
86
81
|
end
|
|
87
82
|
end
|