Class: Hauler::Generators::InstallNpmGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hauler::Generators::InstallNpmGenerator
- Defined in:
- lib/generators/hauler/install_npm_generator.rb
Overview
:nodoc:
Constant Summary collapse
- NPM_DEV_DEPENDENCIES =
<<-TXT.freeze [email protected] [email protected] [email protected] [email protected] babel-preset-react-hmre [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] TXT
- NPM_DEPENDENCIES =
<<-TXT.freeze [email protected] [email protected] TXT
- REACT_NPM_DEPENDENCIES =
<<-TXT.freeze [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] TXT
- SASS_NPM_DEV_DEPENDENCIES =
<<-TXT.freeze [email protected] [email protected] TXT
- LINTER_DEV_DEPENDENCES =
<<-TXT.freeze [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] TXT
- REACT_NPM_DEV_DEPENDENCIES =
<<-TXT.freeze [email protected] [email protected] [email protected] [email protected] [email protected] TXT
Instance Method Summary collapse
- #add_scripts_to_package ⇒ Object
- #install_dependencies ⇒ Object
- #install_dev_dependencies ⇒ Object
- #install_linter_dev_dependencies ⇒ Object
- #install_react_dependencies ⇒ Object
- #install_sass_dependencies ⇒ Object
Instance Method Details
#add_scripts_to_package ⇒ Object
99 100 101 |
# File 'lib/generators/hauler/install_npm_generator.rb', line 99 def add_scripts_to_package run('hauler-update-scripts') end |
#install_dependencies ⇒ Object
76 77 78 79 |
# File 'lib/generators/hauler/install_npm_generator.rb', line 76 def install_dependencies puts 'Installing NPM dependencies...' install_deps(NPM_DEPENDENCIES, dev: false) end |
#install_dev_dependencies ⇒ Object
71 72 73 74 |
# File 'lib/generators/hauler/install_npm_generator.rb', line 71 def install_dev_dependencies puts 'Installing NPM dev dependencies...' install_deps(NPM_DEV_DEPENDENCIES) end |
#install_linter_dev_dependencies ⇒ Object
94 95 96 97 |
# File 'lib/generators/hauler/install_npm_generator.rb', line 94 def install_linter_dev_dependencies puts 'Installing Linter NPM dev dependencies...' install_deps(LINTER_DEV_DEPENDENCES) end |
#install_react_dependencies ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/generators/hauler/install_npm_generator.rb', line 81 def install_react_dependencies puts 'Installing React NPM dev dependencies...' install_deps(REACT_NPM_DEV_DEPENDENCIES) puts 'Installing React NPM dependencies...' install_deps(REACT_NPM_DEPENDENCIES, dev: false) end |
#install_sass_dependencies ⇒ Object
89 90 91 92 |
# File 'lib/generators/hauler/install_npm_generator.rb', line 89 def install_sass_dependencies puts 'Installing Sass NPM dependencies...' install_deps(SASS_NPM_DEV_DEPENDENCIES) end |