less_assets 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -8,6 +8,15 @@ have a look at [Less Rails](https://github.com/metaskills/less-rails).
8
8
 
9
9
  Tested on MRI Ruby 1.8.7, 1.9.2, 1.9.3, REE and the latest version of JRuby.
10
10
 
11
+ ## Why a Style template?
12
+
13
+ Why would you like to have JavaScript Style Templates? If you have a lot of domain models that describes a UI, you can
14
+ convert them dynamically to CSS and have nice style logic in the template instead of code that manipulates the DOM
15
+ style attributes.
16
+
17
+ I also wrote a JavaScript Style Template for [Stylus](https://github.com/learnboost/stylus), see
18
+ [Stylus_Assets](https://github.com/netzpirat/stylus_assets).
19
+
11
20
  ## Installation
12
21
 
13
22
  The simplest way to install Less Assets is to use [Bundler](http://gembundler.com/).
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module LessAssets
4
- VERSION = '0.2.1' unless defined?(LessAssets::VERSION)
4
+ VERSION = '0.2.2' unless defined?(LessAssets::VERSION)
5
5
  end
@@ -55,7 +55,8 @@ class window.LessAssets
55
55
 
56
56
  style.appendChild rules
57
57
 
58
- head = doc.getElementsByTagName('head')[0]
59
- head.appendChild style
58
+ unless doc.getElementById(id)
59
+ head = doc.getElementsByTagName('head')[0]
60
+ head.appendChild style
60
61
 
61
62
  result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: less_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-18 00:00:00.000000000 Z
12
+ date: 2012-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: 590702350648315702
92
+ hash: 3938756669445242867
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements: