stylus 0.0.2 → 0.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## Changelog
2
2
 
3
- ### 0.0.1 (2011-05-18)
3
+ ### 0.0.3 (2011-06-06)
4
+ [Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.0.2...v0.0.3)
5
+
6
+ * Bugfix: stylus now works in production environment.
7
+
8
+ ### 0.0.2 (2011-06-02)
9
+ [Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.0.1...v0.0.2)
4
10
 
11
+ * Added a Rails Generator called `stylus:install` to copy sample files on your `lib/` folder.
12
+ * Added `Stylus.convert` to parse CSS back to Stylus syntax.
13
+
14
+ ### 0.0.1 (2011-05-18)
5
15
  * Initial Release.
data/README.md CHANGED
@@ -6,29 +6,32 @@
6
6
 
7
7
  First, be sure to have stylus installed in your system. If needed, check the project [README](https://github.com/learnboost/stylus) for more information.
8
8
 
9
- require 'stylus'
9
+ ```ruby
10
+ require 'stylus'
10
11
 
11
- # Accepts a raw string or an IO object (File, StringIO or anything that responds to 'read').
12
- Stylus.compile(File.new('application.styl')) # returns the compiled stylesheet.
12
+ # Accepts a raw string or an IO object (File, StringIO or anything that responds to 'read').
13
+ Stylus.compile(File.new('application.styl')) # returns the compiled stylesheet.
13
14
 
14
- # Using the compress option, removing most newlines from the code.
15
- Stylus.compile(File.read('application.styl'), :compress => true)
15
+ # Using the compress option, removing most newlines from the code.
16
+ Stylus.compile(File.read('application.styl'), :compress => true)
16
17
 
17
- # Or use the global compress flag
18
- Stylus.compress = true
19
- Stylus.compile(File.read('application.styl'))
20
-
21
- # Converting old and boring CSS to awesome Stylus.
22
- Stylus.convert(File.new('file.css'))
18
+ # Or use the global compress flag
19
+ Stylus.compress = true
20
+ Stylus.compile(File.read('application.styl'))
23
21
 
22
+ # Converting old and boring CSS to awesome Stylus.
23
+ Stylus.convert(File.new('file.css'))
24
+ ```
24
25
  ### With the Rails 3.1 Asset Pipeline.
25
26
 
26
27
  Just add the `stylus` gem to your Gemfile and the gem will hook itself into Sprockets and enable the `.styl` templates for your stylesheets. If you're including partial files inside your stylesheets, remember to use the `depend_on` directive on the top of your file so Sprockets can recompile it when the partial changes, as below.
27
28
 
28
- //= depend_on 'mixins/vendor.styl'
29
- @import 'mixins/vendor'
29
+ ```sass
30
+ //= depend_on 'mixins/vendor.styl'
31
+ @import 'mixins/vendor'
30
32
 
31
- // Code goes here...
33
+ // Code goes here...
34
+ ```
32
35
 
33
36
  If you just want to merge the generated css in another file, you can use only the `require` directive from Sprockets.
34
37
 
@@ -5,11 +5,15 @@ module Stylus
5
5
 
6
6
  initializer :setup_stylus do |app|
7
7
  config.app_generators.stylesheet_engine :styl
8
+ next unless app.config.assets.enabled
9
+
10
+ require 'sprockets'
11
+ require 'sprockets/engines'
12
+ Sprockets.register_engine '.styl', Tilt::StylusTemplate
8
13
  end
9
14
 
10
15
  config.after_initialize do |app|
11
16
  Stylus.paths.concat app.assets.paths
12
- app.assets.register_engine '.styl', Tilt::StylusTemplate
13
17
  end
14
18
 
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module Stylus
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lucas Mazza
@@ -15,7 +15,8 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-02 00:00:00 Z
18
+ date: 2011-06-06 00:00:00 -03:00
19
+ default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: execjs
@@ -112,6 +113,7 @@ files:
112
113
  - spec/stylus_spec.rb
113
114
  - spec/tilt_spec.rb
114
115
  - stylus.gemspec
116
+ has_rdoc: true
115
117
  homepage: https://github.com/lucasmazza/ruby-stylus
116
118
  licenses: []
117
119
 
@@ -141,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
143
  requirements: []
142
144
 
143
145
  rubyforge_project:
144
- rubygems_version: 1.8.3
146
+ rubygems_version: 1.6.1
145
147
  signing_key:
146
148
  specification_version: 3
147
149
  summary: Ruby Stylus Compiler