lib/jets/builders/code_builder.rb
# This happens in the current app directory not the tmp code for simplicity.
# This is because the node and yarn has likely been set up correctly there.
This happens in the current app directory not the tmp code for simplicity.
This is because the node and yarn has likely been set up correctly there.
This happens in the current app directory not the tmp code for simplicity . This is because the node and yarn has likely been set up correctly there .
def compile_assets
      if ENV['JETS_SKIP_ASSETS']
        puts "Skip compiling assets".colorize(:yellow) 
        return
      end
      headline "Compling assets in current project directory"
      webpacker_loaded = Gem.loaded_specs.keys.include?("webpacker")
      return unless webpacker_loaded
      sh("yarn install")
      webpack_command = File.exist?("#{Jets.root}bin/webpack") ?
          "bin/webpack" :
          `which webpack`.strip
      sh("JETS_ENV=#{Jets.env} #{webpack_command}")
    end
def compile_assets if ENV [ 'JETS_SKIP_ASSETS' ] puts "Skip compiling assets" . colorize ( :yellow ) return end headline "Compling assets in current project directory" webpacker_loaded = Gem . loaded_specs . keys . include? ( "webpacker" ) return unless webpacker_loaded sh ( "yarn install" ) webpack_command = File . exist? ( "#{Jets.root}bin/webpack" ) ? "bin/webpack" : ` which webpack ` . strip sh ( "JETS_ENV=#{Jets.env} #{webpack_command}" ) end
This happens in the current app directory not the tmp code for simplicity.
This happens in the current app directory not the tmp code for simplicity .
# useful for debugging # Thanks: https://stackoverflow.com/questions/4195735/get-list-of-gems-being-used-by-a-bundler-project