Sha256: 6af3fc785b9ed1d94e8751636aed0bbab955dc61ab668d45a263c0c40ae7f07e

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

require 'rake'
require "bundler/gem_tasks"

require 'jslint-v8'

begin
  require 'jasmine'
  load 'jasmine/tasks/jasmine.rake'
rescue LoadError
  task :jasmine do
    abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
  end
end

namespace :js do
  JSLintV8::RakeTask.new do |task|
    task.name = "lint"
    task.description = "runs jslint against all important javascript files"

    task.output_stream = STDOUT

    task.include_pattern = "js/transistor/*.js"

    task.browser = true  # predefine Browser globals
    task.nomen = false # allow _identifier
  end

  desc 'Build min and src version of transistor'
  task :build => :lint do
    if !`git diff --cached`.empty?
      raise "Staged changes have to be commited first"
    end
    if !`git diff`.empty?
      raise "Unstaged changes have to be staged and commited first"
    end
    system "rm -fr build/* && jake && cp build/src/*.js lib/assets/javascripts/ && git add build lib/assets/javascripts && git commit -m 'rake js:build.'"
  end
end

task :build => 'js:build'

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
transistor-0.1.13 Rakefile
transistor-0.1.12 Rakefile
transistor-0.1.11 Rakefile
transistor-0.1.10 Rakefile
transistor-0.1.9 Rakefile
transistor-0.1.8 Rakefile
transistor-0.1.7 Rakefile
transistor-0.1.6 Rakefile
transistor-0.1.5 Rakefile
transistor-0.1.4 Rakefile