Removed the autoprefixer-rails deprecated gem (#10017)
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
This commit is contained in:
parent
268d2fc144
commit
6f86573dbf
8 changed files with 647 additions and 15 deletions
1
Gemfile
1
Gemfile
|
|
@ -18,7 +18,6 @@ gem "administrate", "~> 0.14" # A Rails engine that helps you put together a sup
|
|||
gem "ahoy_email", "~> 1.1" # Email analytics for Rails
|
||||
gem "ahoy_matey", "~> 3.0" # Tracking analytics for Rails
|
||||
gem "ancestry", "~> 3.1" # Ancestry allows the records of a ActiveRecord model to be organized in a tree structure
|
||||
gem "autoprefixer-rails", "~> 9.8" # Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website
|
||||
gem "blazer", "~> 2.2.6" # Allows admins to query data
|
||||
gem "bootsnap", ">= 1.1.0", require: false # Boot large ruby/rails apps faster
|
||||
gem "buffer", "~> 0.1" # Buffer is a Ruby Wrapper for the Buffer API
|
||||
|
|
|
|||
|
|
@ -863,7 +863,6 @@ DEPENDENCIES
|
|||
amazing_print (~> 1.2)
|
||||
ancestry (~> 3.1)
|
||||
approvals (~> 0.0)
|
||||
autoprefixer-rails (~> 9.8)
|
||||
better_errors (~> 2.7)
|
||||
binding_of_caller (~> 0.8)
|
||||
blazer (~> 2.2.6)
|
||||
|
|
|
|||
8
lib/tasks/post_precompile_assets.rake
Normal file
8
lib/tasks/post_precompile_assets.rake
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
task after_assets_precompile: :environment do
|
||||
# Runs postcss/autoprefixer to ensure that our CSS works for all the browsers we support.
|
||||
system("yarn postcss")
|
||||
end
|
||||
|
||||
Rake::Task["assets:precompile"].enhance do
|
||||
Rake::Task["after_assets_precompile"].execute
|
||||
end
|
||||
|
|
@ -23,7 +23,8 @@
|
|||
"lint:frontend": "eslint app/assets/javascripts/**/*.js app/javascript/**/*.jsx app/javascript/**/*.js",
|
||||
"pretest": "npm run lint:frontend",
|
||||
"test": "jest app/javascript/ bin/ --coverage",
|
||||
"test:watch": "jest app/javascript/ bin/ --watch"
|
||||
"test:watch": "jest app/javascript/ bin/ --watch",
|
||||
"postcss": "postcss public/assets/*.css -d public/assets"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
|
@ -143,6 +144,7 @@
|
|||
"@honeybadger-io/webpack": "^1.2.0",
|
||||
"@rails/webpacker": "5.2.1",
|
||||
"ahoy.js": "^0.3.7",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"babel-preset-preact": "^2.0.0",
|
||||
"chart.js": "^2.9.3",
|
||||
"clipboard-polyfill": "^3.0.1",
|
||||
|
|
@ -154,6 +156,9 @@
|
|||
"intersection-observer": "^0.11.0",
|
||||
"linkstate": "^1.1.1",
|
||||
"lodash.debounce": "4.0.8",
|
||||
"postcss-cli": "^7.1.1",
|
||||
"postcss-cssnext": "^3.1.0",
|
||||
"postcss-smart-import": "^0.7.6",
|
||||
"postscribe": "^2.0.8",
|
||||
"preact": "^10.4.7",
|
||||
"preact-textarea-autosize": "^4.0.7",
|
||||
|
|
|
|||
4
postcssconfig.js
Normal file
4
postcssconfig.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/* globals module, require */
|
||||
module.exports = {
|
||||
plugins: [require('autoprefixer')],
|
||||
};
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="stylesheet" media="screen" href="/assets/katex-9b6c3867a72192e69a311ffb59803143541c5bb3af401953b55bc7fc0ad25336.css" />
|
||||
<link rel="stylesheet" media="screen" href="/assets/katex-fingerprint.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="katex-element">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ RSpec.describe KatexTag, type: :liquid_tag do
|
|||
it "generates Katex output" do
|
||||
content = "c = \\pm\\sqrt{a^2 + b^2}"
|
||||
rendered = generate_katex_liquid(content).render
|
||||
verify(format: :html) { rendered }
|
||||
verify(format: :html) { rendered.gsub(/katex-.{64}\.css/, "katex-fingerprint.css") }
|
||||
end
|
||||
|
||||
it "includes the css style tag only once when rendering multiple" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue