Skip to content

postcss-cli do not copy folder structure from input files when pattern is used #78

Description

@sorawit-w

Reopened from postcss/postcss#958

I 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:

  1. The output doesn't have the same folder structure as the input when used with pattern.
  2. 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 :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions