-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
65 lines (53 loc) · 2.33 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# encoding: UTF-8
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'rubygems'
require 'awesome_print'
begin require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rake'
require 'rake/rdoctask'
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Rails Slickgrid'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require "rails_slickgrid/version"
task :build do
system "gem build rails_slickgrid.gemspec"
end
task :release => :build do
system "gem push rails_slickgrid-#{RailsSlickgrid::VERSION}.gem"
end
require 'rails_slickgrid/utils'
desc 'Download slickgrid assets'
task :download_slickgrid do
stylesheets = {
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.columnpicker.css' => 'lib/generators/rails_slickgrid/install/stylesheets/:name',
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.grid.css' => 'lib/generators/rails_slickgrid/install/stylesheets/:name',
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.pager.css' => 'lib/generators/rails_slickgrid/install/stylesheets/:name',
}
javascripts = {
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.columnpicker.js' => 'lib/generators/rails_slickgrid/install/javascripts/:name',
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.editors.js' => 'lib/generators/rails_slickgrid/install/javascripts/:name',
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.model.js' => 'lib/generators/rails_slickgrid/install/javascripts/:name',
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.grid.js' => 'lib/generators/rails_slickgrid/install/javascripts/:name',
'https://github.com/mleibman/SlickGrid/raw/1.4.3/slick.pager.js' => 'lib/generators/rails_slickgrid/install/javascripts/:name',
}
stylesheets.merge(javascripts).each do |url,path|
RailsSlickgrid::Utils.curl url, '-o', path.gsub(/:name/,url.split('/').last)
end
end
desc 'Convert coffee scripts in templates to js'
task :brew_coffee do
Dir.glob('**/*.coffee').each do |fn|
`coffee --bare -c #{fn}`
end
end