middleman-bower 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/middleman/bower.rb +4 -17
- data/lib/middleman/bower/version.rb +1 -1
- data/middleman-bower.gemspec +2 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b820974aa6bd9a2f3a1c878ebd443d95fb44b0e
|
4
|
+
data.tar.gz: 78cc60a0b722122d0af06359f6d4140a46ae0f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c8d0de21aa639ffb1a5af59239e370fe9343b84961a0f1e73ca360a5404260bfd2898807e51573f2058978bbd90ae7a95794f0796e2804591a9b674f7570070
|
7
|
+
data.tar.gz: b6f9baf6c3dca1c3559c9e15929db701ed5a04ccdd7e91b11a8a083df35c49c562e1caf13876f8b8a372f3d09f0210c66085dcf0d670842c16af60b7e9b559aa
|
data/Gemfile
CHANGED
data/lib/middleman/bower.rb
CHANGED
@@ -1,31 +1,18 @@
|
|
1
1
|
require "middleman/bower/version"
|
2
|
+
require "sprockets/bower"
|
2
3
|
|
3
4
|
module Middleman
|
4
5
|
module Bower
|
5
|
-
# Default location where bower stashes its assets.
|
6
|
-
DEFAULT_ASSETS_PATH = './components'
|
7
|
-
|
8
6
|
class << self
|
9
7
|
# Register bower assets into the middleman sprockets asset manifest.
|
10
8
|
def registered(app, options_hash={}, &block)
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
# Try to parse out the directory of bower assets if the user
|
15
|
-
# has specified so in the ./.bowerrc file.
|
16
|
-
bower_directory = if File.exists? bowerrc_path
|
17
|
-
JSON.parse(File.read(bowerrc_path))['directory']
|
18
|
-
end
|
19
|
-
|
20
|
-
# Set the absolute asset path to the one we detected in the .bowerrc file or
|
21
|
-
# the default bower assets path.
|
22
|
-
bower_assets_path = File.join(app.root, bower_directory || DEFAULT_ASSETS_PATH)
|
23
|
-
|
9
|
+
# Create a bower manifest that we'll use to configure sprockets.
|
10
|
+
bower = ::Sprockets::Bower::Manifest.load(File.join(app.root, '.bowerrc'))
|
24
11
|
# We have to wait for Sprockets to be initialized by Middleman
|
25
12
|
# before we can add the bower assets path to the Sprockets path, so
|
26
13
|
# lets set that up in the after_configuration callback.
|
27
14
|
app.after_configuration do
|
28
|
-
|
15
|
+
bower.configure sprockets
|
29
16
|
end
|
30
17
|
end
|
31
18
|
alias :included :registered
|
data/middleman-bower.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.add_dependency "sprockets-bower", ">= 0.0.2"
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
24
|
spec.add_development_dependency "rake"
|
23
25
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-bower
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sprockets-bower
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.2
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|