nanoc-sprockets 0.0.2 → 0.1.0alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/lib/nanoc-sprockets.rb +2 -2
- data/nanoc-sprockets.gemspec +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c4a67ef6c8941d02e31be27e34636fbefa41057
|
4
|
+
data.tar.gz: 14ed26ea1a77c304fb82de4d2a7347bdf4750595
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85f4cff1e51e1c37fc12e53324705cfe34a35388bda6db699ef609870805893dea4d771852b06e336bc3adf199b169634db16a3caa20931a338ca19be6f9dde7
|
7
|
+
data.tar.gz: 96a345f74b109a60027cf10a0b7fb534cf27c6615d06c2e1ebced129ae4f5db517b667f55937d55d2653e5f1712c6b6a556e70138a1858587f4658f0af784ee7
|
data/README.md
CHANGED
@@ -59,6 +59,8 @@ If you plan to use sass, you should probably install the *[sprockets-sass][]* ge
|
|
59
59
|
|
60
60
|
## Usage
|
61
61
|
|
62
|
+
### Helpers
|
63
|
+
|
62
64
|
To link to any assets, use the helpers providers by [sprockets-helpers][].
|
63
65
|
|
64
66
|
* image_path
|
@@ -67,6 +69,19 @@ To link to any assets, use the helpers providers by [sprockets-helpers][].
|
|
67
69
|
* javascript_path
|
68
70
|
* asset_path
|
69
71
|
|
72
|
+
### Enable digest
|
73
|
+
|
74
|
+
By default, digest of assets is not enabled. It means that js/css/images files are not concatened and the filename is preversed. Useful for development.
|
75
|
+
|
76
|
+
To enable digest, add to *lib/default.rb*:
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
Sprockets::Helpers.configure do |c|
|
80
|
+
c.digest = true
|
81
|
+
end
|
82
|
+
|
83
|
+
```
|
84
|
+
|
70
85
|
## License
|
71
86
|
|
72
87
|
(c) 2014 Stormz
|
data/lib/nanoc-sprockets.rb
CHANGED
@@ -23,11 +23,11 @@ module Nanoc::DataSources
|
|
23
23
|
|
24
24
|
assets.map do |bundle|
|
25
25
|
asset = environment.find_asset(bundle)
|
26
|
-
is_binary = !!(asset.pathname && !@
|
26
|
+
is_binary = !!(asset.pathname && !@config[:text_extensions].include?(File.extname(asset.pathname)[1..-1]))
|
27
27
|
|
28
28
|
content_of_filename = is_binary ? asset.pathname : asset.to_s
|
29
29
|
attributes = {filename: bundle, binary: is_binary, mtime: asset.mtime}
|
30
|
-
|
30
|
+
@items.create(content_of_filename, attributes, bundle, attributes)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
data/nanoc-sprockets.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'nanoc-sprockets'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '0.1.0alpha1'
|
6
6
|
s.summary = 'Use sprockets as a datasource for nanoc.'
|
7
7
|
s.description = 'Use sprockets as a datasource for nanoc.'
|
8
8
|
s.homepage = 'https://github.com/stormz/nanoc-sprockets'
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0alpha1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- François de Metz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sprockets-helpers
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.1.0
|
41
41
|
description: Use sprockets as a datasource for nanoc.
|
@@ -57,19 +57,18 @@ require_paths:
|
|
57
57
|
- lib
|
58
58
|
required_ruby_version: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ">"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 1.3.1
|
68
68
|
requirements: []
|
69
69
|
rubyforge_project:
|
70
|
-
rubygems_version: 2.
|
70
|
+
rubygems_version: 2.4.5
|
71
71
|
signing_key:
|
72
72
|
specification_version: 4
|
73
73
|
summary: Use sprockets as a datasource for nanoc.
|
74
74
|
test_files: []
|
75
|
-
has_rdoc:
|