Class: Suspenders::StylelintGenerator

Inherits:
Generators::Base
  • Object
show all
Defined in:
lib/suspenders/generators/stylelint_generator.rb

Defined Under Namespace

Classes: InvokeGenerator, ToggleComments, YarnInstall

Instance Method Summary collapse

Methods inherited from Generators::Base

default_source_root, inherited

Methods included from Actions

#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #replace_in_file

Instance Method Details

#copy_stylelint_configObject


15
16
17
# File 'lib/suspenders/generators/stylelint_generator.rb', line 15

def copy_stylelint_config
  copy_file "stylelintrc.json", ".stylelintrc.json"
end

#install_stylelintObject


10
11
12
13
# File 'lib/suspenders/generators/stylelint_generator.rb', line 10

def install_stylelint
  dependencies = ["stylelint", "@thoughtbot/stylelint-config"]
  action YarnInstall.new(self, dependencies, "--dev")
end

#setup_houndObject


5
6
7
8
# File 'lib/suspenders/generators/stylelint_generator.rb', line 5

def setup_hound
  action InvokeGenerator.new(self, "suspenders:lint")
  action ToggleComments.new(self, ".hound.yml", /stylelintrc/)
end