DEV: Change path for extra scss files in themes (#7664)

The preferred path is `/stylesheets/...`, to match core and plugins. The old `/scss/...` path will continue to function
This commit is contained in:
David Taylor 2019-05-31 15:40:41 +01:00 committed by GitHub
parent 03363d03e8
commit 75fc126224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,9 +379,9 @@ class ThemeField < ActiveRecord::Base
ThemeFileMatcher.new(regex: /^common\/embedded\.scss$/,
targets: :common, names: "embedded_scss", types: :scss,
canonical: -> (h) { "common/embedded.scss" }),
ThemeFileMatcher.new(regex: /^scss\/(?<name>.+)\.scss$/,
ThemeFileMatcher.new(regex: /^(?:scss|stylesheets)\/(?<name>.+)\.scss$/,
targets: :extra_scss, names: nil, types: :scss,
canonical: -> (h) { "scss/#{h[:name]}.scss" }),
canonical: -> (h) { "stylesheets/#{h[:name]}.scss" }),
ThemeFileMatcher.new(regex: /^settings\.ya?ml$/,
names: "yaml", types: :yaml, targets: :settings,
canonical: -> (h) { "settings.yml" }),