lib/npm/rails/package_manager.rb
def to_npm_format
        @packages.inject "" do |string, package|
          # do not add development packages in production environment
          if (@env.production? and package.development?)
            string
          else
            string << "#{ package.name }@\"#{ package.version }\" "
          end
        end
      end
# Return string of packages for 'npm install' command
Return string of packages for 'npm install' command
Return string of packages for ' npm install ' command
def to_npm_format
        @packages.inject "" do |string, package|
          if (@env.production? and package.development?)
            string
          else
            string << "#{ package.name }@\"#{ package.version }\" "
          end
        end
      end
def to_npm_format @packages . inject "" do | string , package | if ( @env . production? and package . development? ) string else string << "#{ package.name }@\"#{ package.version }\" " end end end
Return string of packages for 'npm install' command
Return string of packages for ' npm install ' command
# do not add development packages in production environment