rails-lineman 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e51d44ae72c3978d9f1b45af7a4be41546f0225
4
- data.tar.gz: 976b6968970fa1559e77e59885e2276bd6f09ea4
3
+ metadata.gz: 6790909aea1e6314f0f4921f925d6d7e2c54f461
4
+ data.tar.gz: 5af34142f627fc34fb0622614d6af9aa650cb188
5
5
  SHA512:
6
- metadata.gz: 019e1789c5c48353b8bed1248a2f267638c200069e31c49aeb4d566f0eaf46aeab872655661200a53b7f77003abaa38e5dcde188c775c7282a66cd6cb461555a
7
- data.tar.gz: 14669cc62d098d55dc16c0a57cee8cfcc9e2cd0897a76889d46cddcf9eef77910100c5c1a718ac4e680a22453aae9e1d65dfcb32e7544ab4ff8bd4c7c42053d0
6
+ metadata.gz: 0aa9f969c8c098b687533f461c9c52849d76707705a8b0928df86ff856654b9bbf657bbef7e5cda6ed1d9d1e0e7f03711ebdf8e03a91902cc176d1a8af716443
7
+ data.tar.gz: 4fd7bcb19b3c025444dc1c3c3c54ce6c0344f8b3417c5c83da34ea44122885b0fa07699dd0b52df287a6f25a909b566b93671498a5be1ede486c4d2d45bf6ebc
data/README.md CHANGED
@@ -5,9 +5,43 @@ assets.
5
5
 
6
6
  Wraps the `assets:precompile` rake task by building a specified lineman project.
7
7
 
8
- All you need to set is a config property `Rails.application.config.rails_lineman.lineman_project_location` or environment variable $LINEMAN_PROJECT_LOCATION.
8
+ ## Pointing at your lineman project
9
9
 
10
- You may specify exactly what dist directories you want included through `Rails.application.config.rails_lineman.lineman_assets` or environment variable $LINEMAN_ASSETS. Javascript and CSS are preprocessed, while any other folders- for example, img, are simply included in assets untouched. Multiple folders are expressed as an array of Strings or Symbols.
10
+ In `config/application.rb`, tell the gem where to find your Lineman project:
11
+
12
+ ```
13
+ config.rails_lineman.lineman_project_location = "some-directory"
14
+ ```
15
+
16
+ You can also set an environment variable named `LINEMAN_PROJECT_LOCATION`
17
+
18
+ ## Specifying asset types
19
+
20
+ By default, rails-lineman will only copy `dist/js` and `dist/css` from your Lineman
21
+ build to your Rails assets. To include other assets, like `dist/webfonts`, just add
22
+ them like so:
23
+
24
+ ```
25
+ config.rails_lineman.lineman_assets = [:webfonts, :css, :js]
26
+ ```
27
+
28
+ You can also set an environment variable named `LINEMAN_ASSETS`
29
+
30
+ **Heads up:** if you add additional asset directories like above, you'll want to set up
31
+ the same directories as static routes for Lineman's development server. For example,
32
+ in your `config/application.js` file:
33
+
34
+ ```
35
+ //...
36
+ server: {
37
+ staticRoutes: {
38
+ '/assets/webfonts': 'webfonts'
39
+ }
40
+ }
41
+ //...
42
+ ```
43
+
44
+ ## Referencing Lineman assets from your Rails views
11
45
 
12
46
  From your templates you'll be able to require lineman-built JS & CSS like so:
13
47
 
@@ -72,8 +72,7 @@ module RailsLineman
72
72
  end
73
73
 
74
74
  def destroy
75
- return unless @remove_lineman_assets_after_asset_pipeline_precompilation
76
- delete
75
+ delete_some_assets_for_whatever_reason if @remove_lineman_assets_after_asset_pipeline_precompilation
77
76
  delete_tmp_dir
78
77
  end
79
78
 
@@ -165,7 +164,7 @@ module RailsLineman
165
164
  @assets.map(&:add_if_precompilable)
166
165
  end
167
166
 
168
- def delete
167
+ def delete_some_assets_for_whatever_reason
169
168
  @assets.map(&:delete)
170
169
  end
171
170
 
@@ -1,3 +1,3 @@
1
1
  module RailsLineman
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["searls@gmail.com"]
11
11
  spec.description = %q{Helps Rails apps integrate a Lineman into their build by wrapping rake assets:precompile}
12
12
  spec.summary = %q{Helps Rails apps integrate a Lineman into their build by wrapping rake assets:precompile.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/linemanjs/rails-lineman"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-lineman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-02 00:00:00.000000000 Z
11
+ date: 2014-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -59,7 +59,7 @@ files:
59
59
  - lib/rails_lineman/version.rb
60
60
  - lib/tasks/assets_precompile.rake
61
61
  - rails-lineman.gemspec
62
- homepage: ''
62
+ homepage: https://github.com/linemanjs/rails-lineman
63
63
  licenses:
64
64
  - MIT
65
65
  metadata: {}