sass-rails-source-maps 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +27 -17
- data/lib/sass-rails-source-maps.rb +3 -2
- data/lib/sass-rails-source-maps/sass_template.rb +2 -2
- data/lib/sass-rails-source-maps/version.rb +1 -1
- data/sass-rails-source-maps.gemspec +2 -1
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efbbf38cba2f81f4662d7677b0c8cf38a0005a7a
|
4
|
+
data.tar.gz: 9f150774ccd39a1a79623e411629fce1b1f3d319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ff0d00b97efce41becee5032729b650b210c471e4794f6718ba7f10c15ca15c6f4b974345783a7ba4311a42e34c0bcc296072f963f6298505ee30cb470bbe06
|
7
|
+
data.tar.gz: 02833f76f3bcf73533314a4a63446b244e4a299d050e55e20278bd32619b1bb97e6c210991c24dd89247966dede2da789e3a0c4967b993880080859ab3a4fd2b
|
data/README.markdown
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
# Sass Rails Source Maps
|
2
2
|
|
3
|
+
__NOTE__: This gem requires `sass-rails` version `5.0.0`
|
4
|
+
|
3
5
|
This gem allows you to see your Rails 4 `.scss` source files in Google Chrome inspector, which can be useful for debugging.
|
4
6
|
|
5
7
|
`debug_info` option available in stable [sass](http://sass-lang.com/) gem is no longer working in Google Chrome, because Chrome now supports Source Map [v3](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k) only.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
9
|
-
|
11
|
+
Source Maps are supported by `sass` gem in version `3.3` and higher. Unfortunately, `sass-rails`, the `rails` dependency, freezes `sass` gem to version `~> 3.2.0`. To use this gem, you need to follow these steps:
|
12
|
+
|
13
|
+
* Add `sass-rails-source-maps` to your application's Gemfile :
|
10
14
|
|
11
15
|
````ruby
|
12
16
|
group :development do
|
@@ -14,37 +18,43 @@ group :development do
|
|
14
18
|
end
|
15
19
|
````
|
16
20
|
|
17
|
-
|
21
|
+
This branch depends on `sass-rails` version `5.0.0` which has more relaxed dependency for `sass` gem. So to avoid version conflict you need to:
|
18
22
|
|
19
|
-
|
23
|
+
* Unfreeze `sass-rails` gem in your Gemfile (delete version for `sass-rails`)
|
20
24
|
|
21
|
-
|
25
|
+
For example, in new `Rails 4.1.5` application change line
|
22
26
|
|
23
|
-
|
27
|
+
gem 'sass-rails', '~> 4.0.3'
|
24
28
|
|
25
|
-
|
26
|
-
$ rm -rf public/assets
|
29
|
+
to
|
27
30
|
|
28
|
-
|
31
|
+
gem 'sass-rails'
|
29
32
|
|
30
|
-
|
33
|
+
in your `Gemfile`.
|
31
34
|
|
32
|
-
|
35
|
+
* And then execute:
|
33
36
|
|
34
|
-
|
37
|
+
````
|
38
|
+
bundle update sass-rails
|
39
|
+
````
|
35
40
|
|
36
|
-
After
|
41
|
+
* After that, run:
|
37
42
|
|
38
|
-
|
43
|
+
````
|
44
|
+
rake assets:clobber
|
45
|
+
````
|
39
46
|
|
40
|
-
|
47
|
+
to make Rails regenerate assets. After assets regeneration, `assets/source_maps` containing `sass` source maps is created in `public` directory.
|
48
|
+
|
49
|
+
## Usage
|
41
50
|
|
42
|
-
![
|
51
|
+
If everything works fine, you should see something like this ![screenshot](https://dl.dropboxusercontent.com/u/21012539/screenshots/screenshot.png)
|
43
52
|
|
44
|
-
Enabling source maps may vary in different Chrome versions. For more info please see [Working with CSS Preprocessors](https://
|
53
|
+
Enabling source maps may vary in different Chrome versions. For more info please see [Working with CSS Preprocessors](https://developer.chrome.com/devtools/docs/css-preprocessors#toc-enabling-css-source-maps).
|
45
54
|
|
46
55
|
## Notes
|
47
|
-
* This gem is
|
56
|
+
* This gem is not intended for production usage.
|
57
|
+
* This gem is Rails 4.x compatible only
|
48
58
|
* If you wan't to see `coffeescript` files in Google Chrome inspector you can use [coffee-rails-source-maps](https://github.com/markbates/coffee-rails-source-maps) gem.
|
49
59
|
|
50
60
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'sprockets'
|
2
|
+
require 'sass-rails'
|
2
3
|
require 'fileutils'
|
3
4
|
require 'sass-rails-source-maps/version'
|
4
5
|
require 'sass-rails-source-maps/sass_importer'
|
@@ -10,6 +11,6 @@ module SassRailsSourceMaps
|
|
10
11
|
|
11
12
|
end
|
12
13
|
|
13
|
-
|
14
|
+
Sass::Rails::ScssTemplate.send(:include, SassRailsSourceMaps::SassTemplate)
|
14
15
|
|
15
|
-
|
16
|
+
Sass::Rails::SassTemplate.send(:include, SassRailsSourceMaps::SassTemplate)
|
@@ -24,8 +24,8 @@ module SassRailsSourceMaps
|
|
24
24
|
cache: ::Rails.application.config.assets.debug,
|
25
25
|
line_numbers: ::Rails.application.config.sass.line_numbers,
|
26
26
|
line_comments: ::Rails.application.config.sass.line_comments,
|
27
|
-
importer: SassImporter.new(context
|
28
|
-
load_paths: context.environment.paths.map { |path| SassImporter.new(
|
27
|
+
importer: SassImporter.new(context.pathname.to_s),
|
28
|
+
load_paths: context.environment.paths.map { |path| SassImporter.new(path.to_s) },
|
29
29
|
sprockets: {
|
30
30
|
context: context,
|
31
31
|
environment: context.environment
|
@@ -20,7 +20,8 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.add_dependency "rails"
|
22
22
|
gem.add_dependency "sprockets", ">= 2.3.0"
|
23
|
-
gem.add_dependency "sass",
|
23
|
+
gem.add_dependency "sass", "~> 3.3"
|
24
|
+
gem.add_dependency "sass-rails", "~> 5.0.0.beta1"
|
24
25
|
|
25
26
|
gem.add_development_dependency "bundler", "~> 1.3"
|
26
27
|
gem.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-rails-source-maps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vojtech Hyza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -42,16 +42,30 @@ dependencies:
|
|
42
42
|
name: sass
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.3
|
47
|
+
version: '3.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sass-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 5.0.0.beta1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: 5.0.0.beta1
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,9 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
131
|
version: '0'
|
118
132
|
requirements: []
|
119
133
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
134
|
+
rubygems_version: 2.4.5
|
121
135
|
signing_key:
|
122
136
|
specification_version: 4
|
123
137
|
summary: Rails gem for generating sass source maps
|
124
138
|
test_files: []
|
125
|
-
has_rdoc:
|