Class: Phare::Check::Stylelint
- Inherits:
-
Phare::Check
- Object
- Phare::Check
- Phare::Check::Stylelint
- Defined in:
- lib/phare/check/stylelint.rb
Constant Summary collapse
- GLOBAL_BINARY =
'stylelint'.freeze
- LOCAL_BINARY =
'node_modules/.bin/stylelint'.freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Phare::Check
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(directory, options = {}) ⇒ Stylelint
constructor
A new instance of Stylelint.
Methods inherited from Phare::Check
Constructor Details
#initialize(directory, options = {}) ⇒ Stylelint
Returns a new instance of Stylelint.
10 11 12 13 14 15 16 17 18 |
# File 'lib/phare/check/stylelint.rb', line 10 def initialize(directory, = {}) @directory = directory @config = File.("#{directory}.stylelintrc", __FILE__) @path = File.("#{directory}app/assets/stylesheets", __FILE__) @extensions = %w(.scss) @options = super end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/phare/check/stylelint.rb', line 8 def config @config end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/phare/check/stylelint.rb', line 8 def path @path end |
Instance Method Details
#command ⇒ Object
20 21 22 |
# File 'lib/phare/check/stylelint.rb', line 20 def command "#{binary} #{input}" end |