Class: Suspenders::StylelintGenerator

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

Defined Under Namespace

Classes: YarnInstall

Instance Method Summary collapse

Methods inherited from Generators::Base

default_source_root

Methods included from Actions

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

Instance Method Details

#copy_stylelint_configObject



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

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

#install_stylelintObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/suspenders/generators/stylelint_generator.rb', line 5

def install_stylelint
  dependencies = [
    { name: "stylelint", version: '10' }, # FIXME: config-recommened is not ready for stylelint 11 yet
    { name: "stylelint-config-recommended" },
    { name: "stylelint-order" },
    { name: "stylelint-declaration-block-no-ignored-properties" },
    { name: "stylelint-scss" }
  ]
  action YarnInstall.new(self, dependencies, "--dev")
end