postcss-cli do not copy folder structure from input files when pattern is used
See original GitHub issueI am trying to compile multiple *.pcss
files and have the *.css
output sit in the same directory. For example, I have the following structure:
src
-- test1
---- 1.pcss
-- test2
---- 2.pcss
-- test3
---- 3.pcss
When running:
postcss --use precss src/**/*.pcss --dir out/
I expect:
src
-- test1
---- 1.pcss
-- test2
---- 2.pcss
-- test3
---- 3.pcss
out
-- test1
---- 1.css
-- test2
---- 2.css
-- test3
---- 3.css
But what I got is:
src
-- test1
---- 1.pcss
-- test2
---- 2.pcss
-- test3
---- 3.pcss
out
-- 1.pcss
-- 2.pcss
-- 3.pcss
So there are 2 issues here:
- The output doesn’t have the same folder structure as the input when used with pattern.
- I don’t seem to be able to specify the output file extension when using
--dir
.
Any suggestion please?
By the way, it would be great if such options are also available in a config file as that’s where I actually configure the options 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
postcss-cli - npm
Start using postcss-cli in your project by running `npm i postcss-cli` ... input & output If no input files are passed, it reads...
Read more >Postcss-cli NPM - npm.io
If you pass an input directory, it will process all files in the directory and any subdirectories, respecting the glob pattern. ℹ️ More...
Read more >postcss-cli - UNPKG
postcss -cli/CHANGELOG.md ; 162, - Can't set input files in config file; pass input files on the command line instead. ; 163, -...
Read more >PostCSS Crash Course - YouTube
PostCSS is a Javascript tool used to transform your project's CSS. In this crash course, I'll talk you through the basics, compare PostCSS...
Read more >postcss multiple files | The AI Search Engine You Control
I believe PostCSS starts looking for the input file before it is generated. ... do not copy folder structure from input files when...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ai I understand, will try to see what options we have for renaming extname
postcss src/*.pcss -o dest --ext '.css'
Reopened at https://github.com/postcss/postcss-cli/issues/78