Skip to content

Commit 14df836

Browse files
authored
Add PostCSS import plugin as default
https://github.com/postcss/postcss-import It felt natural to me to immediately use the @import directive and after fighting a bit with it I relised the plugin wasn't installed so it seemed like it would be a sensible default to have. Adding the official postcss-import plugin enables the usage of PostCSS's @import directive out of the box so when adding a CSS library (like open-props) or when adding custom stylesheets it works seamlessly Note that this is **not** the CSS native @import.
1 parent bad2abc commit 14df836

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/install/postcss/install.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
say "Install PostCSS w/ nesting and autoprefixer"
22
copy_file "#{__dir__}/postcss.config.js", "postcss.config.js"
33
copy_file "#{__dir__}/application.postcss.css", "app/assets/stylesheets/application.postcss.css"
4-
run "yarn add postcss postcss-cli postcss-nesting autoprefixer"
4+
run "yarn add postcss postcss-cli postcss-import postcss-nesting autoprefixer"
55

66
say "Add build:css script"
77
build_script = "postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css"

lib/install/postcss/postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
plugins: [
3+
require('postcss-import'),
34
require('postcss-nesting'),
45
require('autoprefixer'),
56
],

0 commit comments

Comments
 (0)