itcsscli 0.1.7 → 0.1.8

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: 17a417aed384e8e84ce30d1a3e5a05a0d40de86f
4
- data.tar.gz: e1b41585f6e46c969e63014a8b83505e1c1be8bd
3
+ metadata.gz: ac6d70a38c35e7aa621333b31fb7e836bb42128f
4
+ data.tar.gz: 5fa97ea373fd5738b89442ac6c8e4a08da92e0a0
5
5
  SHA512:
6
- metadata.gz: 7d331f329e4deabe37f845215c5ce36217b11c879ed62abee70bfe7bfc076d9f3cfcc22213e5420fa2e8a54e8421920069497a588867f024dee2819c877fe415
7
- data.tar.gz: 52954c8a30a90cfbd7050f8007eb595229326fe785316d8c587ef0fdb011e9c27a0389a1591c88dc99b9510e7fe9611864bf1d3cbc50b4d79aca7c7dcd41ad6d
6
+ metadata.gz: 2cbdb389eb901119cd4884af61241468bc53b93ad208f3bc86bfae788aafd32cd80ca3b40edb7206a47c8d9e953e792337be73d9743347078e220bf274e667d9
7
+ data.tar.gz: f36cf8c27ed1f50d332a821fa1bc2a0df5976ea1a42ee294f992162a4e33421a0f4dbbd59d57a919657f9e84d19c614d93d3e501e56d258e89d0733520ffe339
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- .sass-cache
data/README.md CHANGED
@@ -25,7 +25,7 @@ First, you'll need to set up ITCSS by running:
25
25
  ```{r, engine='bash'}
26
26
  $ itcss init
27
27
  ```
28
-
28
+
29
29
  Now go to `itcss.yml` and do your itcss_cli config:
30
30
 
31
31
  ```yml
@@ -150,15 +150,9 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
150
150
 
151
151
  ## Development
152
152
  ```{r, engine='bash'}
153
- $ bundle
154
153
  $ rvm gemset create itcsscli && rvm gemset use itcsscli
155
154
  ```
156
155
 
157
- To compile sass:
158
- ```
159
- $ sass --watch assets/itcss.sass:assets/itcss.css --style compressed --sourcemap=none
160
- ```
161
-
162
156
  ## License
163
157
 
164
158
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/itcsscli.gemspec CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
24
  spec.add_runtime_dependency "colorize", "~> 0.7.7"
25
+ spec.add_runtime_dependency 'rb-readline', '~> 0.5.3'
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module Itcsscli
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/lib/itcsscli.rb CHANGED
@@ -1,9 +1,14 @@
1
1
  require "itcsscli/version"
2
- require "itcss_doc_parser"
3
2
  require "erb"
4
- require 'fileutils'
5
3
  require 'colorize'
6
4
  require 'yaml'
5
+ require 'readline'
6
+
7
+ # autocomplete config
8
+ Readline.completion_append_character = ""
9
+ Readline.completion_proc = Proc.new do |str|
10
+ Dir[str + '*'].grep( /^#{Regexp.escape(str)}/ )
11
+ end
7
12
 
8
13
  module Itcsscli
9
14
  class Core
@@ -13,9 +18,6 @@ module Itcsscli
13
18
  @ITCSS_CONFIG_TEMPLATE = relative_file_path "../templates/itcss_config.erb"
14
19
  @ITCSS_MODULE_TEMPLATE = relative_file_path "../templates/itcss_module.erb"
15
20
  @ITCSS_APP_TEMPLATE = relative_file_path "../templates/itcss_application.erb"
16
- @ITCSS_DOC_TEMPLATE = relative_file_path "../templates/itcss_doc.html.erb"
17
- @ITCSS_DOC_DIR = 'itcssdoc'
18
- @ITCSS_DOC_FILE = "#{@ITCSS_DOC_DIR}/index.html"
19
21
  @ITCSS_MODULES = ["requirements", "settings", "tools", "generic", "base", "objects", "components", "trumps"]
20
22
  @ITCSS_FILES = {
21
23
  "requirements" => "Vendor libraries",
@@ -28,7 +30,7 @@ module Itcsscli
28
30
  "trumps" => "Overrides and helper classes."
29
31
  }
30
32
 
31
- @ITCSS_COMMANDS = ['init', 'install', 'new', 'n', 'inuit', 'update', 'u', 'doc', 'd', '-d', 'help', 'h', '-h', 'version', 'v', '-v']
33
+ @ITCSS_COMMANDS = ['init', 'install', 'new', 'n', 'inuit', 'update', 'u', 'help', 'h', '-h', 'version', 'v', '-v']
32
34
 
33
35
  @ITCSS_COMMANDS_DESCRIPTION = [
34
36
  " COMMAND ALIAS FUNCTION ",
@@ -36,8 +38,7 @@ module Itcsscli
36
38
  "itcss install [filenames] | | Creates an example of ITCSS structure in path specified in #{@ITCSS_CONFIG_FILE}.",
37
39
  "itcss new [module] [filename] | n | Creates a new ITCSS module and automatically import it into imports file.",
38
40
  "itcss inuit new [inuit module] |inuit n| Add specified inuit module as an itcss dependency.",
39
- "itcss inuit help |inuit h| Shows all available itcss inuit commands and it's functions.",
40
- "itcss doc | d, -d | Generate and open itcssdoc.",
41
+ "itcss inuit help |inuit h| Add specified inuit module as an itcss dependency.",
41
42
  "itcss update | u | Updates the imports file using the files inside ITCSS structure.",
42
43
  "itcss help | h, -h | Shows all available itcss commands and it's functions.",
43
44
  "itcss version | v, -v | Shows itcsscli gem version installed."
@@ -54,7 +55,6 @@ module Itcsscli
54
55
  if File.exist?(@ITCSS_CONFIG_FILE) && @ITCSS_CONFIG['package_manager']
55
56
  @ITCSS_PACKAGE_MANAGER ||= @ITCSS_CONFIG['package_manager']
56
57
  @INUIT_MODULES ||= @ITCSS_CONFIG['inuit_modules']
57
- @INUIT_PREFIX ||= @ITCSS_CONFIG['inuit_prefix']
58
58
  else
59
59
  @ITCSS_PACKAGE_MANAGER = nil
60
60
  end
@@ -98,20 +98,18 @@ module Itcsscli
98
98
  elsif 'inuit' == ARGV[0]
99
99
  inuit_command_parser
100
100
 
101
+
101
102
  # $ itcss help
102
103
  elsif ['help', '-h', 'h'].include? ARGV[0]
103
104
  itcss_help
104
105
 
106
+
105
107
  # $ itcss version
106
108
  elsif ['version', '-v', 'v'].include? ARGV[0]
107
109
  itcss_version
108
-
109
- # $ itcss doc
110
- elsif ['doc', '-d', 'd'].include? ARGV[0]
111
- itcss_init_checker
112
- initialize_doc
113
110
  end
114
111
 
112
+
115
113
  # $ itcss update
116
114
  if ['install', 'new', 'n', 'update', 'u'].include? ARGV[0]
117
115
  itcss_init_checker
@@ -122,8 +120,8 @@ module Itcsscli
122
120
  def itcss_init
123
121
  if File.exist?(@ITCSS_CONFIG_FILE)
124
122
  puts "There is already a #{@ITCSS_CONFIG_FILE} created.".yellow
125
- puts "Do you want to override it? [ y / n ]"
126
- user_override_itcss_yml = STDIN.gets.chomp
123
+ puts "Do you want to override it?"
124
+ user_override_itcss_yml = Readline.readline '[ y / n ] > '
127
125
  unless user_override_itcss_yml == 'y'
128
126
  abort
129
127
  end
@@ -134,22 +132,22 @@ module Itcsscli
134
132
  puts "Well done! Let's configure your #{@ITCSS_CONFIG_FILE}:".yellow
135
133
 
136
134
  puts "Provide the root folder name where the ITCSS file structure should be built:"
137
- user_itcss_dir = STDIN.gets.chomp
135
+ user_itcss_dir = Readline.readline '> '
138
136
  init_config['stylesheets_directory'] = user_itcss_dir
139
137
 
140
- puts "What is the name of your base sass file (all ITCSS modules will be imported into it):"
141
- user_itcss_base_file = STDIN.gets.chomp
138
+ puts "What is the name of your base sass file? (all ITCSS modules will be imported into it)"
139
+ user_itcss_base_file = Readline.readline '> '
142
140
  init_config['stylesheets_import_file'] = user_itcss_base_file
143
141
 
144
- puts "Are you using a package manager? [ y / n ]"
145
- user_itcss_package_manager = STDIN.gets.chomp
142
+ puts "Are you using a package manager?"
143
+ user_itcss_package_manager = Readline.readline '[ y / n ] > '
146
144
  if user_itcss_package_manager == 'y'
147
145
  user_package_manager = true
148
146
  end
149
147
 
150
148
  if user_package_manager == true
151
- puts "Choose your package manager [ bower / npm ]:"
152
- user_package_manager = STDIN.gets.chomp
149
+ puts "Choose your package manager:"
150
+ user_package_manager = Readline.readline '[ bower / npm ] > '
153
151
 
154
152
  unless ['bower', 'npm'].include? user_package_manager
155
153
  puts "#{user_package_manager} is not a valid package manager".red
@@ -157,7 +155,6 @@ module Itcsscli
157
155
  end
158
156
 
159
157
  init_config['package_manager'] = user_package_manager
160
- init_config['inuit_prefix'] = ''
161
158
  end
162
159
 
163
160
  File.open @ITCSS_CONFIG_TEMPLATE do |io|
@@ -195,6 +192,7 @@ module Itcsscli
195
192
 
196
193
  file_path = "#{@ITCSS_DIR}/#{type}/_#{type}.#{file}.sass"
197
194
  unless File.exist?(file_path)
195
+ contents = "##{type}.#{file}"
198
196
  File.open file_path, "w+" do |out|
199
197
  out.puts template.result binding
200
198
  end
@@ -217,7 +215,7 @@ module Itcsscli
217
215
  end
218
216
 
219
217
  itcss_module_files = Dir[ File.join("#{@ITCSS_DIR}/#{current_module}/", '**', '*') ].reject { |p| File.directory? p }
220
- itcss_files_to_import[current_module] += itcss_module_files.map{|s| s.gsub("#{@ITCSS_DIR}/", '').gsub(".sass", '').gsub("_", '')}
218
+ itcss_files_to_import[current_module] += itcss_module_files.map{|s| s.gsub("#{@ITCSS_DIR}/", '')}
221
219
  end
222
220
 
223
221
  file_path = "#{@ITCSS_DIR}/#{@ITCSS_BASE_FILE}.sass"
@@ -373,7 +371,9 @@ module Itcsscli
373
371
  end
374
372
 
375
373
  def inuit_imports_path(filename)
376
- "#{@INUIT_PREFIX}inuit-#{filename.split(".")[1]}/#{filename}"
374
+ @ITCSS_PACKAGE_MANAGER == 'bower' ? package_manager_prefix = 'bower_components' : package_manager_prefix = 'node_modules'
375
+ frags = filename.split(".")
376
+ "#{package_manager_prefix}/inuit-#{frags[1]}/#{filename}"
377
377
  end
378
378
 
379
379
  end
@@ -1,2 +1,3 @@
1
- <%= "// @group #{type}" %>
2
- <%= "// @name #{file}" %><%= type == "components" ? "\n\n.#{file}" : '' %>
1
+ <%= "// " + "=" * 40 %>
2
+ <%= "// " + contents %>
3
+ <%= "// " + "=" * 40 %>
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kande Bonfim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.7.7
55
+ - !ruby/object:Gem::Dependency
56
+ name: rb-readline
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.5.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.5.3
55
69
  description:
56
70
  email:
57
71
  - kandebonfim@gmail.com
@@ -66,23 +80,15 @@ files:
66
80
  - LICENSE.txt
67
81
  - README.md
68
82
  - Rakefile
69
- - assets/_syntax.sass
70
- - assets/itcss.css
71
- - assets/itcss.js
72
- - assets/itcss.sass
73
- - assets/logo_cli.svg
74
- - assets/logo_doc.svg
75
83
  - bin/console
76
84
  - bin/itcss
77
85
  - bin/setup
78
86
  - data/inuit_modules.yml
79
87
  - itcsscli.gemspec
80
- - lib/itcss_doc_parser.rb
81
88
  - lib/itcsscli.rb
82
89
  - lib/itcsscli/version.rb
83
90
  - templates/itcss_application.erb
84
91
  - templates/itcss_config.erb
85
- - templates/itcss_doc.html.erb
86
92
  - templates/itcss_module.erb
87
93
  homepage: https://github.com/kandebonfim/itcsscli
88
94
  licenses:
data/assets/_syntax.sass DELETED
@@ -1,95 +0,0 @@
1
- code[class*="language-"],
2
- pre[class*="language-"]
3
- color: black
4
- background: none
5
- text-shadow: 0 1px white
6
- text-align: left
7
- white-space: pre
8
- word-spacing: normal
9
- word-break: normal
10
- word-wrap: normal
11
- line-height: 1.5
12
-
13
- -moz-tab-size: 4
14
- -o-tab-size: 4
15
- tab-size: 4
16
-
17
- -webkit-hyphens: none
18
- -moz-hyphens: none
19
- -ms-hyphens: none
20
- hyphens: none
21
-
22
- pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
23
- code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection
24
- text-shadow: none
25
- background: #b3d4fc
26
-
27
- pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
28
- code[class*="language-"]::selection, code[class*="language-"] ::selection
29
- text-shadow: none
30
- background: #b3d4fc
31
-
32
- @media print
33
- code[class*="language-"],
34
- pre[class*="language-"]
35
- text-shadow: none
36
-
37
- .token.comment,
38
- .token.prolog,
39
- .token.doctype,
40
- .token.cdata
41
- color: slategray
42
-
43
- .token.punctuation
44
- color: #999
45
-
46
- .namespace
47
- opacity: .7
48
-
49
- .token.property,
50
- .token.tag,
51
- .token.boolean,
52
- .token.number,
53
- .token.constant,
54
- .token.symbol,
55
- .token.deleted
56
- color: #6F6F6F
57
-
58
- .token.selector,
59
- .token.attr-name,
60
- .token.string,
61
- .token.char,
62
- .token.builtin,
63
- .token.inserted
64
- color: #690
65
-
66
- .token.operator,
67
- .token.entity,
68
- .token.url,
69
- .language-css .token.string,
70
- .style .token.string
71
- color: #a67f59
72
- background: hsla(0, 0%, 100%, .5)
73
-
74
- .token.atrule,
75
- .token.attr-value,
76
- .token.keyword
77
- color: #07a
78
-
79
- .token.function
80
- color: #DD4A68
81
-
82
- .token.regex,
83
- .token.important,
84
- .token.variable
85
- color: #e90
86
-
87
- .token.important,
88
- .token.bold
89
- font-weight: bold
90
- .token.italic
91
- font-style: italic
92
-
93
- .token.entity
94
- cursor: help
95
-
data/assets/itcss.css DELETED
@@ -1 +0,0 @@
1
- code[class*="language-"],pre[class*="language-"]{color:#000;background:none;text-shadow:0 1px #fff;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]::-moz-selection,pre[class*="language-"] ::-moz-selection,code[class*="language-"]::-moz-selection,code[class*="language-"] ::-moz-selection{text-shadow:none;background:#b3d4fc}pre[class*="language-"]::selection,pre[class*="language-"] ::selection,code[class*="language-"]::selection,code[class*="language-"] ::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*="language-"],pre[class*="language-"]{text-shadow:none}}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#6F6F6F}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#690}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#a67f59;background:rgba(255,255,255,0.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.function{color:#DD4A68}.token.regex,.token.important,.token.variable{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0}a{color:inherit;text-decoration:none}body{font-family:"Roboto Mono",Monaco,monospace;font-size:14px;background-color:#E1DFE1}.container{max-width:600px;margin:60px auto;border-radius:2px;transform:translateX(130px);display:flex;flex-direction:column}.sidebar{position:fixed;width:260px;height:100%;top:0;background-color:#232F42;overflow-y:scroll}header{height:48px;background-color:#567FA8;width:100%;top:0;position:absolute}.logo{height:24px;top:12px;position:absolute;left:12px}.sidebar .logo{position:relative}.sidebar .logo .logo__cli{fill:#567FA8}.nav{position:absolute;width:100%;top:48px;bottom:0;padding-bottom:24px;border-top:1px solid rgba(255,255,255,0.1);overflow-y:scroll}.nav__item{display:block;color:#fff;padding:10px 16px;font-weight:100}.nav__link{padding:6px 16px;margin-left:24px;border-left:4px solid #567FA8;transition:border .2s;font-size:12px}.nav__link:hover{border-left:4px solid #fff}.file{padding-top:6px}.file:before{content:attr(id);text-align:right;display:block;color:#6F6F6F;font-weight:lighter}.file+.file{margin-top:20px}.file__content{padding:20px;background-color:#fff;border:1px solid #BCBCBC;box-shadow:0 3px 6px rgba(0,0,0,0.16);overflow-x:scroll}.file__content .blank_slate{font-size:12px;text-align:center;color:#BCBCBC}.file__content pre{font-size:12px}.module{font-size:26px;line-height:18px;padding:18px 0 8px;color:#6F6F6F}.module:after{content:"";position:absolute;left:-24px;border-style:solid;border-width:10px 0 10px 17.3px;border-color:transparent transparent transparent #567FA8}.file+.module{margin-top:30px}h3:after{color:#fff;font-size:9px;padding:2px 4px;border-radius:4px;vertical-align:middle;content:attr(data-type)}h3[data-type="block"]{color:#2196F3}h3[data-type="block"]:after{background-color:#2196F3}h3[data-type="element"]{color:#9C27B0}h3[data-type="element"]:after{background-color:#9C27B0}h3[data-type="modifier"]{color:#E91E63}h3[data-type="modifier"]:after{background-color:#E91E63}h3[data-type="variable"]{color:#e90}h3[data-type="variable"]:after{background-color:#e90}h3[data-type="mixin"]{color:#673AB7}h3[data-type="mixin"]:after{background-color:#673AB7}h3[data-type="keyframes"]{color:#4CAF50}h3[data-type="keyframes"]:after{background-color:#4CAF50}h3[data-type="unclassed"]{color:#795548}h3[data-type="unclassed"]:after{background-color:#795548}h3[data-type="placeholder-selector"]{color:#3F51B5}h3[data-type="placeholder-selector"]:after{background-color:#3F51B5}h3[data-type="import"]{color:#03A9F4}h3[data-type="import"]:after{background-color:#03A9F4}h3[data-type='variable'],h3[data-type='import']{font-size:14px;font-weight:400}
data/assets/itcss.js DELETED
@@ -1 +0,0 @@
1
- var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map&&e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){r=r||n.languages;var l=r[e];if(2==arguments.length){a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(l[i]=a[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,t,a,r){r=r||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],a||l),"Object"!==n.util.type(e[l])||r[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||r[n.util.objId(e[l])]||(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,r)):(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,r)))}},plugins:{},highlightAll:function(e,t){var a={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var r,l=a.elements||document.querySelectorAll(a.selector),i=0;r=l[i++];)n.highlightElement(r,e===!0,a.callback)},highlightElement:function(t,a,r){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1].toLowerCase(),i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(n.hooks.run("before-sanity-check",u),!u.code||!u.grammar)return n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),a&&_self.Worker){var c=new Worker(n.filename);c.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,r){var l=n.tokenize(e,t);return a.stringify(n.util.encode(l),r)},tokenize:function(e,t){var a=n.Token,r=[e],l=t.rest;if(l){for(var i in l)t[i]=l[i];delete t.rest}e:for(var i in t)if(t.hasOwnProperty(i)&&t[i]){var o=t[i];o="Array"===n.util.type(o)?o:[o];for(var s=0;s<o.length;++s){var u=o[s],c=u.inside,g=!!u.lookbehind,h=!!u.greedy,f=0,d=u.alias;u=u.pattern||u;for(var p=0;p<r.length;p++){var m=r[p];if(r.length>e.length)break e;if(!(m instanceof a)){u.lastIndex=0;var y=u.exec(m),v=1;if(!y&&h&&p!=r.length-1){var b=r[p+1].matchedStr||r[p+1],k=m+b;if(p<r.length-2&&(k+=r[p+2].matchedStr||r[p+2]),u.lastIndex=0,y=u.exec(k),!y)continue;var w=y.index+(g?y[1].length:0);if(w>=m.length)continue;var _=y.index+y[0].length,P=m.length+b.length;if(v=3,P>=_){if(r[p+1].greedy)continue;v=2,k=k.slice(0,P)}m=k}if(y){g&&(f=y[1].length);var w=y.index+f,y=y[0].slice(f),_=w+y.length,S=m.slice(0,w),A=m.slice(_),O=[p,v];S&&O.push(S);var j=new a(i,c?n.tokenize(y,c):y,d,y,h);O.push(j),A&&O.push(A),Array.prototype.splice.apply(r,O)}}}}}return r},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.matchedStr=a||null,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,document.addEventListener&&!r.hasAttribute("data-manual")&&("loading"!==document.readyState?requestAnimationFrame(n.highlightAll,0):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var a=/((\$[-_\w]+)|(#\{\$[-_\w]+\}))/i,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:a,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:a,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,delete e.languages.sass.selector,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism);
data/assets/itcss.sass DELETED
@@ -1,181 +0,0 @@
1
- @import "_syntax"
2
-
3
- // Colors
4
- $c-bg: #E1DFE1
5
- $c-blue: #567FA8
6
- $c-dark-blue: #232F42
7
- $c-gray: #BCBCBC
8
- $c-dark-gray: #6F6F6F
9
-
10
- $c-block: #2196F3
11
- $c-element: #9C27B0
12
- $c-modifier: #E91E63
13
- $c-variable: #e90
14
- $c-mixin: #673AB7
15
- $c-keyframes: #4CAF50
16
- $c-unclassed: #795548
17
- $c-place-sel: #3F51B5
18
- $c-import: #03A9F4
19
- $c-lines: (('block', $c-block),('element', $c-element),('modifier', $c-modifier),('variable', $c-variable),('mixin', $c-mixin),('keyframes', $c-keyframes),('unclassed', $c-unclassed),('placeholder-selector', $c-place-sel),('import', $c-import))
20
-
21
-
22
- // Settings
23
- $sidebar-width: 260px
24
- $container-width: 600px
25
-
26
- // Font
27
- $monospace: "Roboto Mono", Monaco, monospace
28
-
29
- // Resets
30
- html, body, div, span, applet, object, iframe,
31
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
32
- a, abbr, acronym, address, big, cite, code,
33
- del, dfn, em, font, img, ins, kbd, q, s, samp,
34
- small, strike, strong, sub, sup, tt, var,
35
- dl, dt, dd, ol, ul, li,
36
- fieldset, form, label, legend,
37
- table, caption, tbody, tfoot, thead, tr, th, td
38
- margin: 0
39
- padding: 0
40
- border: 0
41
- outline: 0
42
-
43
- a
44
- color: inherit
45
- text-decoration: none
46
-
47
- // Objects
48
- body
49
- font-family: $monospace
50
- font-size: 14px
51
- background-color: $c-bg
52
-
53
- .container
54
- max-width: $container-width
55
- margin: 60px auto
56
- border-radius: 2px
57
- transform: translateX($sidebar-width/2)
58
- display: flex
59
- flex-direction: column
60
-
61
- // Sidebar
62
- .sidebar
63
- position: fixed
64
- width: $sidebar-width
65
- height: 100%
66
- top: 0
67
- background-color: $c-dark-blue
68
- overflow-y: scroll
69
-
70
- // Header
71
- header
72
- height: 48px
73
- background-color: $c-blue
74
- width: 100%
75
- top: 0
76
- position: absolute
77
-
78
- // Logo
79
- .logo
80
- height: 24px
81
- top: 12px
82
- position: absolute
83
- left: 12px
84
-
85
- .sidebar &
86
- position: relative
87
-
88
- .logo__cli
89
- fill: $c-blue
90
-
91
- // Navigation
92
- .nav
93
- position: absolute
94
- width: 100%
95
- top: 48px
96
- bottom: 0
97
- padding-bottom: 24px
98
- border-top: 1px solid rgba(white, .1)
99
- overflow-y: scroll
100
-
101
- .nav__item
102
- display: block
103
- color: white
104
- padding: 10px 16px
105
- font-weight: 100
106
-
107
- .nav__link
108
- padding: 6px 16px
109
- margin-left: 24px
110
- border-left: 4px solid $c-blue
111
- transition: border .2s
112
- font-size: 12px
113
-
114
- &:hover
115
- border-left: 4px solid white
116
-
117
- // File
118
- .file
119
- padding-top: 6px
120
-
121
- &:before
122
- content: attr(id)
123
- text-align: right
124
- display: block
125
- color: $c-dark-gray
126
- font-weight: lighter
127
-
128
- & + &
129
- margin-top: 20px
130
-
131
- .file__content
132
- padding: 20px
133
- background-color: white
134
- border: 1px solid $c-gray
135
- box-shadow: 0 3px 6px rgba(0,0,0,0.16)
136
- overflow-x: scroll
137
-
138
- .blank_slate
139
- font-size: 12px
140
- text-align: center
141
- color: $c-gray
142
-
143
- pre
144
- font-size: 12px
145
-
146
- // Module
147
- .module
148
- font-size: 26px
149
- line-height: 18px
150
- padding: 18px 0 8px
151
- color: $c-dark-gray
152
-
153
- &:after
154
- content: ''
155
- position: absolute
156
- left: -24px
157
- border-style: solid
158
- border-width: 10px 0 10px 17.3px
159
- border-color: transparent transparent transparent $c-blue
160
-
161
- .file + &
162
- margin-top: 30px
163
-
164
- // Markup
165
- h3:after
166
- color: white
167
- font-size: 9px
168
- padding: 2px 4px
169
- border-radius: 4px
170
- vertical-align: middle
171
- content: attr(data-type)
172
-
173
- @each $c-line in $c-lines
174
- h3[data-type="#{nth($c-line,1)}"]
175
- color: nth($c-line,2)
176
- &:after
177
- background-color: nth($c-line,2)
178
-
179
- h3[data-type='variable'], h3[data-type='import']
180
- font-size: 14px
181
- font-weight: 400
data/assets/logo_cli.svg DELETED
@@ -1 +0,0 @@
1
- <svg class="logo" viewBox="0 0 139 21" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="M138.824 31.625V0H0v31.625h138.824z"/></defs><g transform="translate(0 -3)" fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><path class="logo__cli" d="M91.32 17.28c-.073-.29-3.062-.62-3.1-.947-.072-.438 2.08-.875 2.845-1.35.29-.18 2.952-.765 3.025-1.13.037-.4-2.88-.765-2.77-1.166.4-1.968 1.35-3.973 2.88-5.613 1.786-1.896 4.447-3.28 7.946-3.28 3.718 0 6.38 2.113 7.108 5.394l-5.176 2.406c-.364-1.53-1.385-2.26-2.697-2.26-1.166 0-2.114.51-2.843 1.276-.51.583-.91 1.312-1.166 2.077-.145.547 3.318.584 3.318 1.167 0 .22-3.572.984-3.536 1.166.073.51-2.734.948-2.515 1.313.255.4 3.536.73 3.9.947.4.183.84.292 1.313.292 1.312 0 2.405-.693 3.353-1.932l3.973 3.39c-1.713 2.442-4.228 4.046-7.91 4.046-4.046 0-7.035-2.187-7.946-5.796zm20.23.328l-1.567-.947 2.15-1.348 2.662-1.203-2.078-1.167 2.15-8.603h5.87l-2.15 8.603 2.077 1.166s-2.115.8-2.698 1.202c-.11.437-2.005.91-2.114 1.35-.11.4 1.604.764 1.567.946-.037.073-.037.11-.037.11h7.983l-1.35 5.358h-13.85l1.385-5.468zm17.28.037l-2.735-.948 3.317-1.312 3.244-1.167-2.66-1.166 2.15-8.53h5.796l-2.15 8.53 2.66 1.166-3.244 1.167-3.28 1.312 2.697.948-1.35 5.43h-5.795l1.35-5.43z" fill="#232F42" mask="url(#b)"/><path d="M3.09 17.645l-2.733-.948 3.318-1.312 3.244-1.167-2.662-1.166 2.15-8.53h5.796l-2.15 8.53 2.66 1.166-3.244 1.167-3.28 1.312 2.697.948-1.35 5.43H1.744l1.348-5.43zm13.525-.073l-2.15-.948 2.733-1.312 2.66-1.203-2.077-1.167.84-3.318h-5.176l1.75-5.322h16.585l-2.152 5.322h-5.14l-.838 3.318 2.078 1.166-2.697 1.202-2.697 1.312 2.15.948-1.384 5.504h-5.87l1.385-5.504zM32.112 17.28c-.073-.29-3.062-.62-3.1-.947-.07-.438 2.08-.875 2.845-1.35.29-.18 2.952-.765 3.025-1.13.037-.4-2.88-.765-2.77-1.166.4-1.968 1.35-3.973 2.88-5.613 1.786-1.896 4.447-3.28 7.946-3.28 3.718 0 6.38 2.113 7.108 5.394l-5.176 2.406c-.364-1.53-1.385-2.26-2.697-2.26-1.167 0-2.115.51-2.844 1.276-.51.583-.912 1.312-1.167 2.077-.146.547 3.317.584 3.317 1.167 0 .22-3.572.984-3.536 1.166.073.51-2.734.948-2.515 1.313.254.4 3.535.73 3.9.947.4.183.838.292 1.312.292 1.312 0 2.405-.693 3.353-1.932l3.974 3.39c-1.715 2.442-4.23 4.046-7.912 4.046-4.046 0-7.035-2.187-7.946-5.796zM50.232 19.868l1.75-2.296.802-.984.656-.84c1.932 1.715 3.9 2.553 5.65 2.553.73 0 1.24-.29 1.24-.8 0-.365-4.703-.584-5.396-.912-.437-.22.328-.365.62-.583.583-.4.583-.33.948-.693.62-.62 2.55-.73 2.04-1.167-.4-.328-4.738-.692-4.993-1.13-.402-.62-.584-1.385-.584-2.296 0-1.532.583-2.917 1.604-4.01 1.312-1.422 3.39-2.297 5.978-2.297 2.99 0 5.687 1.02 7.51 2.697l-2.844 4.484c-1.276-1.094-3.463-2.37-5.25-2.37-.728 0-1.202.183-1.202.693 0 .547.328.656 2.66 1.567 1.167.474 2.152.948 2.917 1.53.436.33 3.644.694 3.936 1.13.22.33-1.97.913-2.333 1.168-.62.4-2.698.838-2.698 1.35 0 .29 2.844.545 2.844.837-.184 1.275-.694 2.44-1.57 3.39-1.275 1.348-3.352 2.223-6.013 2.223-3.354 0-6.234-1.276-8.275-3.245zm18.773 0l1.75-2.296.802-.984.656-.84c1.932 1.715 3.9 2.553 5.65 2.553.73 0 1.24-.29 1.24-.8 0-.365-4.703-.584-5.396-.912-.437-.22.328-.365.62-.583.583-.4.583-.33.948-.693.62-.62 2.55-.73 2.04-1.167-.4-.328-4.738-.692-4.993-1.13-.4-.62-.583-1.385-.583-2.296 0-1.532.582-2.917 1.603-4.01 1.312-1.422 3.39-2.297 5.978-2.297 2.99 0 5.687 1.02 7.51 2.697l-2.843 4.484c-1.276-1.094-3.463-2.37-5.25-2.37-.728 0-1.202.183-1.202.693 0 .547.328.656 2.66 1.567 1.167.474 2.15.948 2.917 1.53.437.33 3.645.694 3.937 1.13.217.33-1.97.913-2.334 1.168-.62.4-2.698.838-2.698 1.35 0 .29 2.843.545 2.843.837-.18 1.275-.69 2.44-1.566 3.39-1.276 1.348-3.354 2.223-6.015 2.223-3.354 0-6.234-1.276-8.275-3.245z" fill="#FFF" mask="url(#b)"/></g></svg>
data/assets/logo_doc.svg DELETED
@@ -1 +0,0 @@
1
- <svg class="logo" width="154" height="21" viewBox="0 0 154 21" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="M159 26V0H0v26h159z"/></defs><g transform="translate(0 -3)" fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><path class="logo__cli" d="M91.06 17.6l-2.7-.9 3.276-1.332 3.24-1.188-2.664-1.152 2.124-8.532h6.156c3.348 0 5.472.972 6.768 2.376 1.296 1.404 1.872 3.204 1.872 5.436v.72c-.036.396 2.844.792 2.808 1.152-.072.396-2.88 1.008-3.24 1.188-.576.36-3.204.9-3.42 1.332-.144.288 2.664.612 2.484.9-.396.72-.9 1.404-1.476 2.016-2.052 2.232-5.076 3.42-9.072 3.42h-7.524L91.06 17.6zm8.676-7.704h-.972l-.756 3.132 2.628 1.152-3.24 1.188-3.24 1.332 2.7.936h1.008c1.368 0-.036-.324-.036-.936-.036-.432 2.412-.72 2.7-.828.396-.108 1.44-.252 2.052-.504.36-.144 3.312-.756 3.456-1.188.072-.36-2.628-.792-2.772-1.08-.036-.036 0-.108 0-.144 0-1.008-.288-1.656-.72-2.124-.54-.576-1.404-.936-2.808-.936zm31.732 2.592c0 .144 0 .324-.036.468 0 .396 2.808.756 2.736 1.116-.036.396-2.952.792-3.06 1.152-.108.432-3.096.864-3.24 1.26-.144.324 2.592.612 2.448.9-.468.936-1.08 1.764-1.764 2.52-1.728 1.872-4.176 3.06-6.912 3.06-3.96 0-6.912-2.304-7.92-5.58-.072-.288-2.988-.576-3.06-.9-.072-.396 2.736-.828 2.7-1.26 0-.108 1.152-.468 1.26-.504.324-.216 1.584-.36 1.62-.648 0-.36-2.772-.756-2.7-1.116.36-2.088 1.332-3.996 2.736-5.472 1.728-1.872 4.14-3.06 6.912-3.06 4.896 0 8.28 3.492 8.28 8.064zm-8.064 4.932c.396-.216-2.052-.468-1.728-.828.324-.36 3.456-.792 3.672-1.26.18-.396 3.168-.828 3.24-1.26.072-.324-2.736-.684-2.736-1.044 0-1.872-1.044-3.348-3.06-3.348-1.008 0-1.836.432-2.484 1.116-.54.576-.936 1.332-1.188 2.16-.072.36 2.7.756 2.7 1.116-.036.108-.612.18-1.332.432-.252.108-1.224.54-1.44.72-.576.432-2.592.9-2.34 1.26.252.396 3.42.684 3.852.9.396.216.9.324 1.476.324.504 0 .936-.108 1.368-.288zm12.544-.144c-.072-.288-3.024-.612-3.06-.936-.072-.432 2.052-.864 2.808-1.332.288-.18 2.916-.756 2.988-1.116.036-.396-2.844-.756-2.736-1.152.396-1.944 1.332-3.924 2.844-5.544 1.764-1.872 4.392-3.24 7.848-3.24 3.672 0 6.3 2.088 7.02 5.328l-5.112 2.376c-.36-1.512-1.368-2.232-2.664-2.232-1.152 0-2.088.504-2.808 1.26-.504.576-.9 1.296-1.152 2.052-.144.54 3.276.576 3.276 1.152 0 .216-3.528.972-3.492 1.152.072.504-2.7.936-2.484 1.296.252.396 3.492.72 3.852.936.396.18.828.288 1.296.288 1.296 0 2.376-.684 3.312-1.908l3.924 3.348c-1.692 2.412-4.176 3.996-7.812 3.996-3.996 0-6.948-2.16-7.848-5.724z" fill="#232F42" mask="url(#b)"/><path d="M3.09 17.645l-2.733-.948 3.318-1.312 3.244-1.167-2.662-1.166 2.15-8.53h5.796l-2.15 8.53 2.66 1.166-3.244 1.167-3.28 1.312 2.697.948-1.35 5.43H1.744l1.348-5.43zm13.525-.073l-2.15-.948 2.733-1.312 2.66-1.203-2.077-1.167.84-3.318h-5.176l1.75-5.322h16.585l-2.152 5.322h-5.14l-.838 3.318 2.078 1.166-2.697 1.202-2.697 1.312 2.15.948-1.384 5.504h-5.87l1.385-5.504zM32.112 17.28c-.073-.29-3.062-.62-3.1-.947-.07-.438 2.08-.875 2.845-1.35.29-.18 2.952-.765 3.025-1.13.037-.4-2.88-.765-2.77-1.166.4-1.968 1.35-3.973 2.88-5.613 1.786-1.896 4.447-3.28 7.946-3.28 3.718 0 6.38 2.113 7.108 5.394l-5.176 2.406c-.364-1.53-1.385-2.26-2.697-2.26-1.167 0-2.115.51-2.844 1.276-.51.583-.912 1.312-1.167 2.077-.146.547 3.317.584 3.317 1.167 0 .22-3.572.984-3.536 1.166.073.51-2.734.948-2.515 1.313.254.4 3.535.73 3.9.947.4.183.838.292 1.312.292 1.312 0 2.405-.693 3.353-1.932l3.974 3.39c-1.715 2.442-4.23 4.046-7.912 4.046-4.046 0-7.035-2.187-7.946-5.796zM50.232 19.868l1.75-2.296.802-.984.656-.84c1.932 1.715 3.9 2.553 5.65 2.553.73 0 1.24-.29 1.24-.8 0-.365-4.703-.584-5.396-.912-.437-.22.328-.365.62-.583.583-.4.583-.33.948-.693.62-.62 2.55-.73 2.04-1.167-.4-.328-4.738-.692-4.993-1.13-.402-.62-.584-1.385-.584-2.296 0-1.532.583-2.917 1.604-4.01 1.312-1.422 3.39-2.297 5.978-2.297 2.99 0 5.687 1.02 7.51 2.697l-2.844 4.484c-1.276-1.094-3.463-2.37-5.25-2.37-.728 0-1.202.183-1.202.693 0 .547.328.656 2.66 1.567 1.167.474 2.152.948 2.917 1.53.436.33 3.644.694 3.936 1.13.22.33-1.97.913-2.333 1.168-.62.4-2.698.838-2.698 1.35 0 .29 2.844.545 2.844.837-.184 1.275-.694 2.44-1.57 3.39-1.275 1.348-3.352 2.223-6.013 2.223-3.354 0-6.234-1.276-8.275-3.245zm18.773 0l1.75-2.296.802-.984.656-.84c1.932 1.715 3.9 2.553 5.65 2.553.73 0 1.24-.29 1.24-.8 0-.365-4.703-.584-5.396-.912-.437-.22.328-.365.62-.583.583-.4.583-.33.948-.693.62-.62 2.55-.73 2.04-1.167-.4-.328-4.738-.692-4.993-1.13-.4-.62-.583-1.385-.583-2.296 0-1.532.582-2.917 1.603-4.01 1.312-1.422 3.39-2.297 5.978-2.297 2.99 0 5.687 1.02 7.51 2.697l-2.843 4.484c-1.276-1.094-3.463-2.37-5.25-2.37-.728 0-1.202.183-1.202.693 0 .547.328.656 2.66 1.567 1.167.474 2.15.948 2.917 1.53.437.33 3.645.694 3.937 1.13.217.33-1.97.913-2.334 1.168-.62.4-2.698.838-2.698 1.35 0 .29 2.843.545 2.843.837-.18 1.275-.69 2.44-1.566 3.39-1.276 1.348-3.354 2.223-6.015 2.223-3.354 0-6.234-1.276-8.275-3.245z" fill="#FFF" mask="url(#b)"/></g></svg>
@@ -1,157 +0,0 @@
1
- def initialize_doc
2
- puts 'parsing your files...'.yellow
3
-
4
- @ITCSS_MODULES.each do |current_module|
5
- itcss_module_files = Dir[ File.join("#{@ITCSS_DIR}/#{current_module}/", '**', '*') ].reject { |p| File.directory? p }
6
- if itcss_module_files.kind_of?(Array) && itcss_module_files.any?
7
- module_header = construct_module_header current_module
8
- @all_files_markup = @all_files_markup.to_s + module_header
9
- end
10
- itcss_module_files.each do |current_file|
11
- map_file current_file
12
- end
13
- end
14
-
15
- construct_navigation
16
- write_itcss_map_file @all_files_markup, @nav
17
- end
18
-
19
- def map_file file
20
- File.open file do |io|
21
- get_lines_content io.read
22
- end
23
-
24
- selector_indexes = get_selector_indexes @line_type_indexes
25
- selector_blocks = get_selector_blocks @lines, selector_indexes
26
- file_markup = construct_file_markup selector_blocks, file
27
- @all_files_markup = @all_files_markup.to_s + file_markup
28
- end
29
-
30
- def get_lines_content content
31
- @lines, @line_type_indexes = [], []
32
- content.each_line.with_index do |line, index|
33
- line_content = get_line_content line
34
- (@lines ||= []).push line
35
- (@line_type_indexes ||= []).push line_content
36
- # puts "#{index}|#{line_content}|#{line}"
37
- end
38
- end
39
-
40
- def get_line_content line
41
- if line.chars.size <= 1
42
- "em" # empty
43
- elsif line.start_with? '/// '
44
- "sc" # super comment
45
- elsif line.start_with? '// '
46
- "rc" # regular comment
47
- elsif line.start_with? ' '
48
- "pr" # property
49
- else
50
- 'sl' # selector
51
- end
52
- end
53
-
54
- def get_selector_type line
55
- if line.start_with? '='
56
- "mixin"
57
- elsif line.start_with? '$'
58
- "variable"
59
- elsif line.start_with? '@import'
60
- "import"
61
- elsif line.start_with? '@keyframes'
62
- "keyframes"
63
- elsif line.start_with? '%'
64
- "placeholder selector"
65
- elsif !line.include? '.'
66
- "unclassed"
67
- elsif line.include? '--'
68
- "modifier"
69
- elsif line.include? '__'
70
- "element"
71
- else
72
- "block"
73
- end
74
- end
75
-
76
- def get_selector_indexes line_type_indexes
77
- line_type_indexes.each_index.select{|x| line_type_indexes[x] == "sl"}
78
- end
79
-
80
- def get_selector_blocks lines, selector_indexes
81
- @selector_blocks = []
82
- selector_indexes.each_with_index do |index, i|
83
- (@selector_blocks ||= []).push lines[index..(selector_indexes[i+1] ? selector_indexes[i+1]-1 : lines.size)]
84
- end
85
-
86
- @selector_blocks
87
- end
88
-
89
- def construct_file_markup selector_blocks, file_name
90
- file_markup = "<div class='file' id='#{excerpt_filename file_name}'><div class='file__content'>"
91
- if selector_blocks.kind_of?(Array) && selector_blocks.any?
92
- selector_blocks.each do |selector_block|
93
- selector_type = get_selector_type selector_block.first
94
- file_markup += "<h3 data-type='#{selector_type}'>#{line_break_string selector_block.shift}</h3>"
95
- file_markup += "<pre><code class='language-sass'>#{line_break_array selector_block}</code></pre>"
96
- end
97
- else
98
- file_markup += "<div class='blank_slate'>Empty file :/</div>"
99
- end
100
- file_markup += "</div></div>"
101
-
102
- file_markup
103
- end
104
-
105
- def construct_module_header module_name
106
- "<div id='#{module_name}' class='module'>#{module_name}</div>"
107
- end
108
-
109
- def construct_navigation
110
- @nav = '<div class="nav">'
111
- @ITCSS_MODULES.each do |current_module|
112
- itcss_module_files = Dir[ File.join("#{@ITCSS_DIR}/#{current_module}/", '**', '*') ].reject { |p| File.directory? p }
113
- if itcss_module_files.kind_of?(Array) && itcss_module_files.any?
114
- @nav += "<a href='##{current_module}' class='nav__item'>#{current_module}</a>"
115
- itcss_module_files.each do |current_file|
116
- @nav += "<a href='##{excerpt_filename current_file}' class='nav__item nav__link'>#{excerpt_filename(current_file).split('.')[1]}</a>"
117
- end
118
- end
119
- end
120
- @nav += '</div>'
121
- end
122
-
123
- def write_itcss_map_file content, nav
124
- File.open @ITCSS_DOC_TEMPLATE do |io|
125
- template = ERB.new io.read
126
- logo = line_break_removal File.open(relative_file_path('../assets/logo_doc.svg')).read
127
- style = line_break_removal File.open(relative_file_path('../assets/itcss.css')).read
128
- javascript = line_break_removal File.open(relative_file_path('../assets/itcss.js')).read
129
-
130
- FileUtils.mkdir_p @ITCSS_DOC_DIR
131
- File.open @ITCSS_DOC_FILE, "w+" do |out|
132
- out.puts template.result binding
133
- end
134
-
135
- puts "The documentation has been successfully generated.".green
136
- puts "create #{@ITCSS_DOC_FILE}".green
137
- puts "opening #{@ITCSS_DOC_FILE}...".yellow
138
- `open #{@ITCSS_DOC_FILE}`
139
- end
140
- end
141
-
142
- # Helper
143
- def excerpt_filename file
144
- File.basename(file, ".*").sub('_', '')
145
- end
146
-
147
- def line_break_array content
148
- content.map{ |p| p.sub("\n", '&#10;') }.join
149
- end
150
-
151
- def line_break_string content
152
- content.sub "\n", '&#10;'
153
- end
154
-
155
- def line_break_removal content
156
- content.sub "\n", ''
157
- end
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>ITCSSDoc</title></script></head><body><style><%= style %></style><script><%= javascript %></script><div class="container"><%= content %></div><div class="sidebar"><%= logo %><%= nav %></div><header><%= logo %></header></body></html>