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

Watch a directory but only rebuild index.scss #78

Open
emilkarl opened this issue Sep 23, 2018 · 5 comments
Open

Watch a directory but only rebuild index.scss #78

emilkarl opened this issue Sep 23, 2018 · 5 comments

Comments

@emilkarl
Copy link

I want to watch my styles directory for changes but only rebuild index.scss to css.

I got a styles structure looking like this...

styles
    ├── index.css
    ├── index.scss
    ├── sections
    │   └── header.scss
    └── shared
        ├── colors.scss
        └── page.scss
@laurentpayot
Copy link

laurentpayot commented Jun 18, 2020

I have the same issue with node-sass-chokidar. In my style directory I'm using a global.sass file that is only a list of @import of other files in the same directory. Modifying one of these imported files does nothing when watching global.sass.
@michaelwayman is impossible to extend the watching to imported files when watching a global/index/main/younameit file with imports?

@michaelwayman
Copy link
Owner

Can someone please give a small example of this and the version of the package/version of node/os you are using?

@michaelwayman
Copy link
Owner

michaelwayman commented Jun 18, 2020

I will try to fix it on the chokidar side of node-sass. But give me a project structure or something to work off of

@laurentpayot
Copy link

Sure, will try to set up a little example asap.

@laurentpayot
Copy link

@michaelwayman I've just created this repo: https://github.com/laurentpayot/node-sass-chokidar-import-example
As you can see only main.sass is watched. Modifying other imported sass files do not trigger a css build.

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

No branches or pull requests

3 participants