Class: Webpacker::Commands
- Inherits:
-
Object
- Object
- Webpacker::Commands
- Defined in:
- lib/webpacker/commands.rb
Instance Method Summary collapse
- #bootstrap ⇒ Object
- #clobber ⇒ Object
- #compile ⇒ Object
-
#initialize(webpacker) ⇒ Commands
constructor
A new instance of Commands.
Constructor Details
#initialize(webpacker) ⇒ Commands
Returns a new instance of Commands.
4 5 6 |
# File 'lib/webpacker/commands.rb', line 4 def initialize(webpacker) @webpacker = webpacker end |
Instance Method Details
#bootstrap ⇒ Object
13 14 15 16 |
# File 'lib/webpacker/commands.rb', line 13 def bootstrap config.refresh manifest.refresh end |
#clobber ⇒ Object
8 9 10 11 |
# File 'lib/webpacker/commands.rb', line 8 def clobber config.public_output_path.rmtree if config.public_output_path.exist? config.cache_path.rmtree if config.cache_path.exist? end |
#compile ⇒ Object
18 19 20 21 22 |
# File 'lib/webpacker/commands.rb', line 18 def compile compiler.compile.tap do |success| manifest.refresh if success end end |