stylus 0.3.0.pre → 0.3.0
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/.travis.yml +2 -1
- data/CHANGELOG.md +3 -2
- data/Gemfile +1 -1
- data/README.md +3 -9
- data/lib/stylus.rb +6 -2
- data/lib/stylus/version.rb +1 -1
- data/stylus.gemspec +1 -0
- metadata +28 -17
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
-
### 0.3.0
|
4
|
-
[Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.2.2...
|
3
|
+
### 0.3.0 (2011-10-17)
|
4
|
+
[Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.2.2...v.0.30)
|
5
5
|
|
6
|
+
* This gem now uses the [stylus-source](https://github.com/railsjedi/ruby-stylus-source) gem to bundle the latest [NPM](http://search.npmjs.org/#/stylus) package of Stylus, so there's no setup required to install stylus via `npm install` or cloning it into the `node_modules` folder - Thanks @railsjedi.
|
6
7
|
* Added a `debug` configuration option, that enables the `linenos` and `firebug` flags on Stylus. Inside Rails, this configuration option will be copied from the `config.assets.debug`;
|
7
8
|
* Added a global array `import` that handles other stylesheets to include on every compilation process;
|
8
9
|
* Added a shorthand `Stylus.nib = true` to use the plugin and import it on every processed stylesheet.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -6,17 +6,11 @@
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
|
9
|
+
Since version 0.3.0, the [stylus-source](https://github.com/railsjedi/ruby-stylus-source) packages the Stylus source into a Rubygems, so it will be available after installing this gem. The `ruby-source` version will follow the Stylus releases and their versions.
|
10
10
|
|
11
|
-
|
11
|
+
You can replace the Stylus code by placing another version of Stylus on `./node_modules/stylus`, and it will be used instead of the version bundled inside the gem.
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
### Manual
|
16
|
-
|
17
|
-
You can clone Stylus [git repository](http://github.com/learnboost/stylus) into `node_modules/stylus`. Any `node` commands and/or shells from the current directory will be able to find the cloned package.
|
18
|
-
|
19
|
-
Check your installation with `node -e "require('stylus')"`. It should print something like [this](https://gist.github.com/1182631) and exit successfully.
|
13
|
+
**But remember**, You still need the `node` command available on your runtime for this gem to work. `stylus` is also compatible with the Heroku Cedar stack, enabling the asset compilation during the deployment of your apps.
|
20
14
|
|
21
15
|
## Usage
|
22
16
|
|
data/lib/stylus.rb
CHANGED
@@ -2,7 +2,7 @@ require 'execjs'
|
|
2
2
|
require 'stylus/version'
|
3
3
|
require 'stylus/tilt' if defined?(::Tilt)
|
4
4
|
require 'stylus/railtie' if defined?(::Rails)
|
5
|
-
|
5
|
+
require 'stylus/source'
|
6
6
|
## Stylus
|
7
7
|
#
|
8
8
|
# `stylus` is a bridge between your Ruby code and the [Stylus](https://github.com/LearnBoost/stylus)
|
@@ -164,9 +164,13 @@ module Stylus
|
|
164
164
|
:runner_path => File.expand_path("../stylus/runner.js", __FILE__)
|
165
165
|
)
|
166
166
|
end
|
167
|
+
|
168
|
+
def bundled_path
|
169
|
+
File.dirname(Stylus::Source.bundled_path)
|
170
|
+
end
|
167
171
|
end
|
168
172
|
|
169
173
|
# Exports the `.node_modules` folder on the working directory so npm can
|
170
174
|
# require modules installed locally.
|
171
|
-
ENV['NODE_PATH'] = "#{File.expand_path('node_modules')}:#{ENV['NODE_PATH']}"
|
175
|
+
ENV['NODE_PATH'] = "#{File.expand_path('node_modules')}:#{bundled_path}:#{ENV['NODE_PATH']}"
|
172
176
|
end
|
data/lib/stylus/version.rb
CHANGED
data/stylus.gemspec
CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = %q{Bridge library to compile .styl stylesheets from ruby code.}
|
14
14
|
|
15
15
|
s.add_dependency 'execjs'
|
16
|
+
s.add_dependency 'stylus-source'
|
16
17
|
s.add_development_dependency 'rspec', '~> 2.0'
|
17
18
|
s.add_development_dependency 'railties', '~> 3.1.0'
|
18
19
|
s.add_development_dependency 'tzinfo'
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stylus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Lucas Mazza
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: execjs
|
16
|
-
requirement: &
|
16
|
+
requirement: &70345063766460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,21 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70345063766460
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: stylus-source
|
27
|
+
requirement: &70345063761640 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70345063761640
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: rspec
|
27
|
-
requirement: &
|
38
|
+
requirement: &70345063759280 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ~>
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '2.0'
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *70345063759280
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: railties
|
38
|
-
requirement: &
|
49
|
+
requirement: &70345063757120 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ~>
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: 3.1.0
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70345063757120
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: tzinfo
|
49
|
-
requirement: &
|
60
|
+
requirement: &70345063756220 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,10 +65,10 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :development
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *70345063756220
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: yajl-ruby
|
60
|
-
requirement: &
|
71
|
+
requirement: &70345063754580 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
73
|
requirements:
|
63
74
|
- - ! '>='
|
@@ -65,10 +76,10 @@ dependencies:
|
|
65
76
|
version: '0'
|
66
77
|
type: :development
|
67
78
|
prerelease: false
|
68
|
-
version_requirements: *
|
79
|
+
version_requirements: *70345063754580
|
69
80
|
- !ruby/object:Gem::Dependency
|
70
81
|
name: rocco
|
71
|
-
requirement: &
|
82
|
+
requirement: &70345063752320 !ruby/object:Gem::Requirement
|
72
83
|
none: false
|
73
84
|
requirements:
|
74
85
|
- - ! '>='
|
@@ -76,7 +87,7 @@ dependencies:
|
|
76
87
|
version: '0'
|
77
88
|
type: :development
|
78
89
|
prerelease: false
|
79
|
-
version_requirements: *
|
90
|
+
version_requirements: *70345063752320
|
80
91
|
description: Bridge library to compile .styl stylesheets from ruby code.
|
81
92
|
email:
|
82
93
|
- luc4smazza@gmail.com
|
@@ -142,9 +153,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
154
|
none: false
|
144
155
|
requirements:
|
145
|
-
- - ! '
|
156
|
+
- - ! '>='
|
146
157
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
158
|
+
version: '0'
|
148
159
|
requirements: []
|
149
160
|
rubyforge_project:
|
150
161
|
rubygems_version: 1.8.10
|