metalsmith-sass icon indicating copy to clipboard operation
metalsmith-sass copied to clipboard

Modifying a partial file does not trigger a re-compile

Open treyhunner opened this issue 10 years ago • 6 comments

I have a _partial.scss file imported in my main app.scss file. Modifying and saving _partial.scss does not trigger the SCSS to be re-compiled, but saving app.scss does.

treyhunner avatar Jul 06 '15 20:07 treyhunner

What are you using to monitor changes and re-compile? Sounds like something metalsmith-sass doesn't handle by itself :)

stevenschobert avatar Jul 06 '15 22:07 stevenschobert

I am using metalsmith-watch, but I didn't think that was causing the re-compile because it doesn't re-compile the CSS when I modify an HTML file, but it does when I modify an SCSS file that doesn't start with _.

I'm not sure where to file this bug.

Could this be sass that's doing the monitoring?

treyhunner avatar Jul 08 '15 21:07 treyhunner

No worries, I'm sure we can track it down!

Can you share your metalsmith settings?

stevenschobert avatar Jul 09 '15 01:07 stevenschobert

I ran into this problem today. The issue is in the configuration of metalsmith-watch. Adding the middle line in the 'paths' array triggers the reloading for all sass/scss files:

.use(watch({
     paths: {
        "${source}/**/*": true,
        "${source}/sass/*": "**/*.scss",
        "templates/**/*": "**/*.md",
},
livereload: true,

}))

ryanAbbott avatar Sep 21 '15 14:09 ryanAbbott

This is still an issue I think. Changes are detected, but changes are being updated in css files.

[metalsmith-watch] ✔︎ src/scss/partials/_posts-list.scss changed
[metalsmith-watch] - Updating 1 file...
[metalsmith-watch] ✔︎ 13 files reloaded

There's an open issue on the metalsmith-watch repo too. Any ideas what to do?

lokenx avatar Nov 17 '15 01:11 lokenx

any progress on this?

samuelgoldenbaum avatar Mar 01 '17 15:03 samuelgoldenbaum