amiel-sprockets 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/sprocketize +54 -0
- metadata +54 -0
data/bin/sprocketize
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.join(File.dirname(__FILE__), *%w".. lib sprockets")
|
4
|
+
require "optparse"
|
5
|
+
|
6
|
+
load_path = (ENV["SPROCKETS_PATH"] || "").split(":")
|
7
|
+
filenames = []
|
8
|
+
options = { :load_path => load_path, :source_files => filenames, :expand_paths => false }
|
9
|
+
|
10
|
+
OptionParser.new do |opts|
|
11
|
+
opts.summary_width = 28
|
12
|
+
opts.banner = "Usage: sprocketize [options] filename [filename ...]"
|
13
|
+
|
14
|
+
def opts.show_usage
|
15
|
+
puts self
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on("-C DIRECTORY", "--directory=DIRECTORY", "Change to DIRECTORY before doing anything") do |directory|
|
20
|
+
Dir.chdir(directory)
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on("-I DIRECTORY", "--include-dir=DIRECTORY", "Adds the directory to the Sprockets load path") do |directory|
|
24
|
+
load_path << directory
|
25
|
+
end
|
26
|
+
|
27
|
+
opts.on("-a DIRECTORY", "--asset-root=DIRECTORY", "Copy provided assets into DIRECTORY") do |directory|
|
28
|
+
options[:asset_root] = directory
|
29
|
+
end
|
30
|
+
|
31
|
+
opts.on_tail("-h", "--help", "Shows this help message") do
|
32
|
+
opts.show_usage
|
33
|
+
end
|
34
|
+
|
35
|
+
opts.on_tail("-v", "--version", "Shows version") do
|
36
|
+
puts Sprockets::Version::STRING
|
37
|
+
exit
|
38
|
+
end
|
39
|
+
|
40
|
+
opts.show_usage if ARGV.empty?
|
41
|
+
|
42
|
+
begin
|
43
|
+
opts.order(ARGV) do |filename|
|
44
|
+
filenames << filename
|
45
|
+
end
|
46
|
+
rescue OptionParser::ParseError => e
|
47
|
+
opts.warn e.message
|
48
|
+
opts.show_usage
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
secretary = Sprockets::Secretary.new(options)
|
53
|
+
secretary.install_assets if options[:asset_root]
|
54
|
+
print secretary.concatenation
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: amiel-sprockets
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sam Stephenson
|
8
|
+
- Amiel Martin
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2009-02-24 00:00:00 -08:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: Sprockets is a Ruby library that preprocesses and concatenates JavaScript and other source files.
|
18
|
+
email: sstephenson@gmail.com
|
19
|
+
executables:
|
20
|
+
- sprocketize
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files: []
|
24
|
+
|
25
|
+
files: []
|
26
|
+
|
27
|
+
has_rdoc: false
|
28
|
+
homepage: http://getsprockets.org/
|
29
|
+
post_install_message:
|
30
|
+
rdoc_options: []
|
31
|
+
|
32
|
+
require_paths:
|
33
|
+
- lib
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: "0"
|
39
|
+
version:
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
version:
|
46
|
+
requirements: []
|
47
|
+
|
48
|
+
rubyforge_project: sprockets
|
49
|
+
rubygems_version: 1.2.0
|
50
|
+
signing_key:
|
51
|
+
specification_version: 2
|
52
|
+
summary: JavaScript dependency management and concatenation
|
53
|
+
test_files: []
|
54
|
+
|