tilt-importantcss 0.0.1

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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in tilt-importantcss.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # Tilt Importantcss
2
+
3
+ A sprockets engine that adds `!important` to every css declaration.
4
+
5
+ Created for use with [Cleanslate](https://github.com/premasagar/cleanslate.git)
6
+
7
+ To use, add `.important` to your css filename, for example:
8
+
9
+ styles.css.important.scss
10
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
1
+ require 'tilt' unless defined? Tilt
2
+ require 'tilt-importantcss/engine'
3
+
4
+ module TiltImportantcss
5
+ end
@@ -0,0 +1,19 @@
1
+ if defined?(Rails)
2
+ module TiltImportantcss
3
+ class Engine < Rails::Engine
4
+ initializer "tilt_jade.configure_rails_initialization" do |app|
5
+ next unless app.config.assets.enabled
6
+
7
+ require 'sprockets'
8
+ require 'sprockets/engines'
9
+ require "tilt-importantcss/template"
10
+ if app.assets
11
+ app.assets.register_engine '.important', ::TiltImportantcss::Template
12
+ else
13
+ # Rails 3.1.0rc
14
+ Sprockets.register_engine '.important', ::TiltImportantcss::Template
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ require 'tilt' unless defined? Tilt
2
+
3
+ module TiltImportantcss
4
+ class Template < ::Tilt::Template
5
+
6
+ def initialize_engine
7
+ end
8
+
9
+ def prepare
10
+ end
11
+
12
+ def evaluate(scope, locals, &block)
13
+ data.gsub(';', ' !important;')
14
+ end
15
+
16
+ end
17
+ #register 'important', ::TiltImportantcss::Template
18
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ #require "tilt-importantcss/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "tilt-importantcss"
7
+ s.version = "0.0.1"
8
+ s.authors = ["stereosteve"]
9
+ s.email = ["stereosteve@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Sprockets / Tilt engine that adds !important to all your css declarations.}
12
+ s.description = %q{Sprockets / Tilt engine that adds !important to all your css declarations.}
13
+
14
+ s.rubyforge_project = "tilt-importantcss"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.require_paths = ["lib"]
18
+
19
+ # specify any dependencies here; for example:
20
+ # s.add_development_dependency "rspec"
21
+ # s.add_runtime_dependency "rest-client"
22
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tilt-importantcss
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - stereosteve
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-02 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: Sprockets / Tilt engine that adds !important to all your css declarations.
15
+ email:
16
+ - stereosteve@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - Gemfile
23
+ - README.md
24
+ - Rakefile
25
+ - lib/tilt-importantcss.rb
26
+ - lib/tilt-importantcss/engine.rb
27
+ - lib/tilt-importantcss/template.rb
28
+ - tilt-importantcss.gemspec
29
+ homepage: ''
30
+ licenses: []
31
+ post_install_message:
32
+ rdoc_options: []
33
+ require_paths:
34
+ - lib
35
+ required_ruby_version: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubyforge_project: tilt-importantcss
49
+ rubygems_version: 1.8.11
50
+ signing_key:
51
+ specification_version: 3
52
+ summary: Sprockets / Tilt engine that adds !important to all your css declarations.
53
+ test_files: []