Class: Webpacker::Compiler
- Inherits:
-
Object
- Object
- Webpacker::Compiler
- Defined in:
- lib/webpacker/compiler.rb
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(webpacker) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(webpacker) ⇒ Compiler
Returns a new instance of Compiler.
12 13 14 |
# File 'lib/webpacker/compiler.rb', line 12 def initialize(webpacker) @webpacker = webpacker end |
Instance Method Details
#compile ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/webpacker/compiler.rb', line 16 def compile if stale? run_webpack.tap do |success| after_compile_hook end else logger.debug "Everything's up-to-date. Nothing to do" true end end |