Shopify / shopify-css-import

Add CSS import functionality to Shopify theme development with Grunt.js or Gulp.js
http://shopify.github.io/shopify-css-import
MIT License
83 stars 18 forks source link

files beginning with underscore are copied to assets (and uploaded to Shopify) #8

Closed ryandeussing closed 9 years ago

ryandeussing commented 10 years ago

When running gulp watch and theme watch (simultaneously, in separate terminal windows) many (but not all, for no reason I can determine) of the files I'm importing into my theme.scss.liquid file (e.g. _foo.scss.liquid, _bar.scss.liquid) are copied to assets and then uploaded to Shopify.

kennedysgarage commented 10 years ago

I noticed that if I wasn't importing some files into theme.scss.liquid they would be placed inside my assets folder. Either import them or remove them. This worked for me.

hancheroffsmith commented 9 years ago

I had the same problem and I could be way off because I'm new to gulp but this worked for me. In the globalConfig you only need to reference the theme.scss.liquid. The current blanket call to gulp.src(globalConfig.src + '/**/*.*') results in the _*.* being unnecessarily copied to the assets folder. The cssimport traverses the @import calls in the theme.scss.liquid and includes theme in the new theme.scss.liquid in the assets folder. Just being more implicit in the gulp.src call in the styles task worked for me. Figured this out after reading through the docs on cssimport.

cshold commented 9 years ago

++ absolutely right, the blanket call is a bit over-reaching. Anyone want to open a PR with the fix?