Skip to content

Commit f298f4d

Browse files
committed
.css.scss -> .scss
1 parent c43606b commit f298f4d

31 files changed

+22
-21
lines changed

lib/rails/generators/sass/assets/assets_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class AssetsGenerator < ::Rails::Generators::NamedBase
66
source_root File.expand_path("../templates", __FILE__)
77

88
def copy_sass
9-
template "stylesheet.css.sass", File.join('app/assets/stylesheets', class_path, "#{file_name}.css.sass")
9+
template "stylesheet.sass", File.join('app/assets/stylesheets', class_path, "#{file_name}.sass")
1010
end
1111
end
1212
end

lib/rails/generators/sass_scaffold.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ def copy_stylesheet
88
dir = ::Rails::Generators::ScaffoldGenerator.source_root
99
file = File.join(dir, "scaffold.css")
1010
converted_contents = ::Sass::CSS.new(File.read(file)).render(syntax)
11-
create_file "app/assets/stylesheets/scaffolds.css.#{syntax}", converted_contents
11+
create_file "app/assets/stylesheets/scaffolds.#{syntax}", converted_contents
1212
end
1313
end
1414
end
1515
end
16-

lib/rails/generators/scss/assets/assets_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class AssetsGenerator < ::Rails::Generators::NamedBase
66
source_root File.expand_path("../templates", __FILE__)
77

88
def copy_scss
9-
template "stylesheet.css.scss", File.join('app/assets/stylesheets', class_path, "#{file_name}.css.scss")
9+
template "stylesheet.scss", File.join('app/assets/stylesheets', class_path, "#{file_name}.scss")
1010
end
1111
end
1212
end

lib/sass/rails/importer.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ def initialize(context, *args)
1414
def extensions
1515
{
1616
'css' => :scss,
17-
'css.scss' => :scss,
18-
'css.sass' => :sass,
1917
'css.erb' => :scss,
2018
'scss.erb' => :scss,
2119
'sass.erb' => :sass,
20+
21+
# css.scss and css.sass extensions are deprecated.
22+
'css.scss' => :scss,
23+
'css.sass' => :sass,
2224
'css.scss.erb' => :scss,
2325
'css.sass.erb' => :sass
2426
}.merge!(super)

0 commit comments

Comments
 (0)