Class: Trek::Generators::Install::LefthookGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Trek::Generators::Install::LefthookGenerator
- Includes:
- Helpers
- Defined in:
- lib/generators/trek/install/lefthook_generator.rb
Constant Summary collapse
- NPM_DEPENDENCIES =
{ lefthook: "^1.4.2" }
Instance Method Summary collapse
- #copy_lefthook_config ⇒ Object
-
#install_dependencies ⇒ Object
This is after copying the config, because it installs the hooks as a postinstall script.
Instance Method Details
#copy_lefthook_config ⇒ Object
18 19 20 |
# File 'lib/generators/trek/install/lefthook_generator.rb', line 18 def copy_lefthook_config copy_file_at_root "lefthook.yml" end |
#install_dependencies ⇒ Object
This is after copying the config, because it installs the hooks as a postinstall script.
23 24 25 |
# File 'lib/generators/trek/install/lefthook_generator.rb', line 23 def install_dependencies install_npm_dependencies(NPM_DEPENDENCIES, dev: true) end |