Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI - build/watch directory #18

Closed
danbradham opened this issue May 8, 2018 · 3 comments · Fixed by #23
Closed

CLI - build/watch directory #18

danbradham opened this issue May 8, 2018 · 3 comments · Fixed by #23

Comments

@danbradham
Copy link
Collaborator

The current CLI only supports building and watching a single sass file. This may be suitable for small projects, but, large projects tend to have more varied structures. For example, a project may have a base stylesheet with dark and light variants.

  • /scss
    • _base.scss
    • dark.scss
    • light.scss

To support the above scenario we should add a CLI option -d/--directory that will compile and watch for changes in all the scss files contained in the directory except for those starting with an underscore. The -d/--directory and the -f/--file options should be mutually exclusive raising an error when both are provided. When using the -d flag the -o flag specifies an output directory for the compiled css.

Valid usages

qtsass -d scss -o css
qtsass -d scss -o css -w
qtsass -f scss/dark.scss -o css/dark.css
qtsass -f scss/dark.scss -o css/dark.css -w
@danbradham danbradham modified the milestone: v0.1.0 May 8, 2018
@goanpeca
Copy link
Member

goanpeca commented May 8, 2018

@danbradham how about just having a -p --path option and just point to either a specific file, or a folder

qtsass -p scss -o css
qtsass -p scss -o css -w
qtsass -p scss/dark.scss -o css/dark.css
qtsass -p scss/dark.scss -o css/dark.css -w

@danbradham
Copy link
Collaborator Author

Yeah, that's good. We can make sure the CLI help string makes all these use cases apparent. Python libsass also ships with a setuptools build command that is pretty nifty, let's you specify all your scss files liiiike:

setup(
...
    sass_manifests={
       'package': ('/scss', '/css')
    },
)

Kind of nifty, maybe we can support that down the line.

@goanpeca
Copy link
Member

goanpeca commented May 8, 2018

Sure!, we can open a separate issue to track that.

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

Successfully merging a pull request may close this issue.

2 participants