itcsscli 0.1.14 → 0.1.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 553007da018d7270065ed7385f552358b4d9ded9
4
- data.tar.gz: ed6dc830214f75d1c834760e955732107e69b4ab
3
+ metadata.gz: 9081443b8ed8e0744f779af515ddd59e4a34d53f
4
+ data.tar.gz: d7a61a26a07817e9dc9596bdfdb99b8f98789c15
5
5
  SHA512:
6
- metadata.gz: 26ffd0916de434762f1b146e382febe9c016e2c5da1bb7c68de87b0facb0ecf22872b29d64dff82b58854357f28a9285998e8cbc676492ecd70c4fe56ac31551
7
- data.tar.gz: 2d89dfab49dd7752d9283fa417005a2fa2bc04443c95d5162dc674b1b991d66cc73772036b165a1dc0eaa42b13ac57718da165453e67fbeb3d8aafdfd49678a5
6
+ metadata.gz: fa76e5901d38cae54b0ff232021f4e54a6a30eca06135af884c985536ed676a010787a08ced6d6a1c91b8f027d6073bb6ef9accbf2ec21bcaf07bc0ee1a67500
7
+ data.tar.gz: 6ea0becf7b9e51edb4f1ddad22b3e41ade16a82832c5e38586c4ed881c4758412d550664eca2e4f5df11803f87a8e2e47237780b9f08fb9f7f5f5bcf865348bd
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .sass-cache
11
+ .DS_Store
@@ -54,6 +54,7 @@ module Itcsscli
54
54
  @ITCSS_CONFIG = YAML.load_file(@ITCSS_CONFIG_FILE)
55
55
  @ITCSS_DIR ||= @ITCSS_CONFIG['stylesheets_directory']
56
56
  @ITCSS_BASE_FILE ||= @ITCSS_CONFIG['stylesheets_import_file']
57
+ @ITCSS_EXTENSION ||= @ITCSS_CONFIG['extension']
57
58
  else
58
59
  @ITCSS_CONFIG = nil
59
60
  end
@@ -148,6 +149,10 @@ module Itcsscli
148
149
  user_itcss_base_file = Readline.readline '> '
149
150
  init_config['stylesheets_import_file'] = user_itcss_base_file
150
151
 
152
+ puts "What extension do you want to use? (sass or scss)"
153
+ user_itcss_base_file_extension = Readline.readline '> '
154
+ init_config['extension'] = user_itcss_base_file_extension
155
+
151
156
  puts "Are you using a package manager?"
152
157
  user_itcss_package_manager = Readline.readline '[ y / n ] > '
153
158
  if user_itcss_package_manager == 'y'
@@ -200,7 +205,7 @@ module Itcsscli
200
205
  FileUtils.mkdir_p "#{@ITCSS_DIR}/#{type}"
201
206
  FileUtils.chmod "u=wrx,go=rx", @ITCSS_DIR
202
207
 
203
- file_path = "#{@ITCSS_DIR}/#{type}/_#{type}.#{file}.sass"
208
+ file_path = "#{@ITCSS_DIR}/#{type}/_#{type}.#{file}.#{@ITCSS_EXTENSION}"
204
209
  unless File.exist?(file_path)
205
210
  File.open file_path, "w+" do |out|
206
211
  out.puts template.result binding
@@ -224,11 +229,11 @@ module Itcsscli
224
229
  end
225
230
 
226
231
  itcss_module_files = Dir[ File.join("#{@ITCSS_DIR}/#{current_module}/", '**', '*') ].reject { |p| File.directory? p }
227
- itcss_files_to_import[current_module] += itcss_module_files.map{|s| s.gsub("#{@ITCSS_DIR}/", '').gsub(".sass", '').gsub("_", '')}
232
+ itcss_files_to_import[current_module] += itcss_module_files.map{|s| s.gsub("#{@ITCSS_DIR}/", '').gsub(".#{@ITCSS_EXTENSION}", '').gsub("_", '')}
228
233
  end
229
234
 
230
- file_path = "#{@ITCSS_DIR}/#{@ITCSS_BASE_FILE}.sass"
231
- contents = "#{@ITCSS_BASE_FILE}.sass"
235
+ file_path = "#{@ITCSS_DIR}/#{@ITCSS_BASE_FILE}.#{@ITCSS_EXTENSION}"
236
+ contents = "#{@ITCSS_BASE_FILE}.#{@ITCSS_EXTENSION}"
232
237
  File.open @ITCSS_APP_TEMPLATE do |io|
233
238
  template = ERB.new io.read
234
239
 
@@ -1,3 +1,3 @@
1
1
  module Itcsscli
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -1,2 +1,2 @@
1
1
  <%= "/// @group #{type}" %>
2
- <%= "/// @name #{file}" %><%= type == "components" ? "\n\n.#{file}" : '' %>
2
+ <%= "/// @name #{file}" %><%= type == "components" ? "\n\n.#{file}" : '' %><%= type == "components" && @ITCSS_EXTENSION == 'scss' ? "{\n \n}" : '' %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itcsscli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kande Bonfim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.6.8
121
+ rubygems_version: 2.6.11
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Manage you CSS with ITCSS from command line.