Sha256: fddc86439c7dde7191c62ef322b76dac0e6000391d46e5daddd65936ed44cf7e

Contents?: true

Size: 831 Bytes

Versions: 12

Compression:

Stored size: 831 Bytes

Contents

# encoding: utf-8
task default: :test

desc 'Use UglifyJS to compress Underscore.string'
task :build do
  require 'uglifier'
  source = File.read('lib/underscore.string.js', :encoding => 'utf-8')
  compressed = Uglifier.compile(source, copyright: false)
  File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed }
  compression_rate = compressed.length.to_f/source.length
  puts "compressed dist/underscore.string.min.js: #{compressed.length}/#{source.length} #{(compression_rate * 100).round}%"
end

desc 'Run tests'
task :test do
  puts "Running underscore.string test suite."
  result1 = system %{phantomjs ./test/run-qunit.js "test/test.html"}

  puts "Running Underscore test suite."
  result2 = system %{phantomjs ./test/run-qunit.js "test/test_underscore/index.html"}

  exit(result1 && result2 ? 0 : 1)
end

Version data entries

12 entries across 10 versions & 3 rubygems

Version Path
entangled-0.0.16 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
entangled-0.0.15 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
entangled-0.0.14 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
entangled-0.0.13 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
entangled-0.0.12 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
entangled-0.0.11 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
entangled-0.0.10 spec/dummy/public/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
trans-0.5.10 template/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile
trans-0.5.10 template/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
trans-0.5.9 template/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile
trans-0.5.9 template/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile
cssesc-source-0.1.0 vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile