Module: Opal::Util
Defined Under Namespace
Classes: Command, DigestSourceCommand
Instance Method Summary collapse
- 
  
    
      #gzip(str)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Gzip code to check file size.
 - 
  
    
      #uglify(str)  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Used for uglifying source to minify.
 
Instance Method Details
#gzip(str) ⇒ Object
Gzip code to check file size.
      17 18 19 20  | 
    
      # File 'opal/lib/opal/util.rb', line 17 def gzip(str) gzip = DigestSourceCommand.new(:gzip, '-f', ', it is required to produce the .gz version') gzip.digest(str) end  | 
  
#uglify(str) ⇒ String
      11 12 13 14  | 
    
      # File 'opal/lib/opal/util.rb', line 11 def uglify(str) uglifyjs = DigestSourceCommand.new(:uglifyjs, nil, ' (install with: "npm install -g uglify-js")') uglifyjs.digest(str) end  |