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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08b450cd58d4421491bf3a4d96c1cd59f72c549d
4
- data.tar.gz: b04752dd48f4a72735251c35f0530b1ef4bd4a05
3
+ metadata.gz: efbbf38cba2f81f4662d7677b0c8cf38a0005a7a
4
+ data.tar.gz: 9f150774ccd39a1a79623e411629fce1b1f3d319
5
5
  SHA512:
6
- metadata.gz: 57cbd7e7a07efd098d7dabd2610408b313be3018091c9115e6302e345c9334b995ebdc8beb2c7f15d069731bde7baaf80d6efb13ebc56c1c61f8da8aac037f04
7
- data.tar.gz: 10e0c377cb6660401857f5fd7386d9fa70f630f709ce1d4b26a9f6a31207db16a0f845e461c7c2c6872ecb55a0040a3a69053f5427829f0045b8390be53e1a7b
6
+ metadata.gz: 0ff0d00b97efce41becee5032729b650b210c471e4794f6718ba7f10c15ca15c6f4b974345783a7ba4311a42e34c0bcc296072f963f6298505ee30cb470bbe06
7
+ data.tar.gz: 02833f76f3bcf73533314a4a63446b244e4a299d050e55e20278bd32619b1bb97e6c210991c24dd89247966dede2da789e3a0c4967b993880080859ab3a4fd2b
@@ -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
- Add this to your application's Gemfile :
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
- And then execute:
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
- $ bundle update sass
23
+ * Unfreeze `sass-rails` gem in your Gemfile (delete version for `sass-rails`)
20
24
 
21
- to use `sass` gem with Source Maps v3 support, which is currently pre-release version.
25
+ For example, in new `Rails 4.1.5` application change line
22
26
 
23
- After that, run:
27
+ gem 'sass-rails', '~> 4.0.3'
24
28
 
25
- $ rm -rf tmp/cache/assets
26
- $ rm -rf public/assets
29
+ to
27
30
 
28
- to make Rails regenerate assets. After assets regeneration, `assets/source_maps` containing `sass` source maps is created in `public` directory.
31
+ gem 'sass-rails'
29
32
 
30
- ## Usage
33
+ in your `Gemfile`.
31
34
 
32
- To see something like this ![screenshot](https://dl.dropboxusercontent.com/u/21012539/screenshots/screenshot.png) you need to enable source maps in Google Chrome.
35
+ * And then execute:
33
36
 
34
- To enable source maps open Chrome inspector go to [chrome://flags/#enable-devtools-experiments](chrome://flags/#enable-devtools-experiments) and `Enable Developer Tools experiments`. Then restart Google Chrome.
37
+ ````
38
+ bundle update sass-rails
39
+ ````
35
40
 
36
- After restart, go to inspector `Experiments` settings and enable `Sass stylesheet debugging`.
41
+ * After that, run:
37
42
 
38
- ![experimental settings](https://dl.dropboxusercontent.com/u/21012539/screenshots/screenshot_experiments.png)
43
+ ````
44
+ rake assets:clobber
45
+ ````
39
46
 
40
- And finally in `General` settings check `Enable source maps`.
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
- ![general settings](https://dl.dropboxusercontent.com/u/21012539/screenshots/screenshot_general.png)
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://developers.google.com/chrome-developer-tools/docs/css-preprocessors); part _Using Sass with CSS source maps_.
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 Rails 4 compatible only
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
- Sprockets::ScssTemplate.send(:include, SassRailsSourceMaps::SassTemplate)
14
+ Sass::Rails::ScssTemplate.send(:include, SassRailsSourceMaps::SassTemplate)
14
15
 
15
- Sprockets::SassTemplate.send(:include, SassRailsSourceMaps::SassTemplate)
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, context.pathname),
28
- load_paths: context.environment.paths.map { |path| SassImporter.new(context, path) },
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
@@ -1,3 +1,3 @@
1
1
  module SassRailsSourceMaps
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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", ">= 3.3.0.rc.3"
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
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: 2014-02-14 00:00:00.000000000 Z
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.0.rc.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: 3.3.0.rc.3
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.2.0
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: