at-import / SassyLists

MIT License
276 stars 27 forks source link

NPM build is broken #59

Closed ncoden closed 7 years ago

ncoden commented 7 years ago

The current npm build command includes /stylesheets/_SassyLists.scss. It contains all the @import statements and thus generates an invalid dist file.

How did you compiled the latest dist/_SassyLists.scss for the v3.0.0 ?

KittyGiraudel commented 7 years ago

Oh. I guess we should make sure npm publishes the dist file. Didn’t realise you wanted to use it like this. I can’t do that now, so I’ll tackle this some time at the end of the week-end.

ncoden commented 7 years ago

I don't want to use it like this, but I want to compile Foundation to dist/foundation.scss too and don't know how to do it properly.

My solution for now is to concatenate source files without the main file containing the @imports statements. But it only works because no source file is using @import.

ncoden commented 7 years ago

@HugoGiraudel See: https://github.com/ncoden/gulp-shopify-sass ;)

KittyGiraudel commented 7 years ago

Okay so, what do we do about this? I don’t want to bring Gulp in there.

ncoden commented 7 years ago

You can:

KittyGiraudel commented 7 years ago

I don’t get it. Why isn’t https://github.com/at-import/SassyLists/blob/master/dist/_SassyLists.scss okay with you?

ncoden commented 7 years ago

It is okay. But I don't know how you built it, the npm run build command doesn't build that file.

Edit: I said bullshit since the begining. stylesheets/**/* does not include stylesheets/_SassyLists.scss. I thought it was. I close.

KittyGiraudel commented 7 years ago

It does.

rm -rf dist/ && mkdir dist/ && cat stylesheets/**/* > dist/_SassyLists.scss
ncoden commented 7 years ago

Yes, it does when I run the script alone, and not when I run the build command... 🤔

KittyGiraudel commented 7 years ago

Works fine here. Do you have an error?

ncoden commented 7 years ago
➜  SassyLists git:(master) ✗ rm -rf dist/ && mkdir dist/ && cat stylesheets/**/* > dist/_SassyLists.scss
cat: stylesheets/functions: Is a directory
cat: stylesheets/helpers: Is a directory
➜  SassyLists git:(master) ✗ cat dist/_SassyLists.scss | head -n 6
// SassyLists - A couple of advanced Sass list functions
//
// Official site: http://at-import.github.io/functions/
// Repository: https://github.com/at-import/functions/

@import 'helpers/missing-dependencies';

stylesheets/_SassyLists.scss is imported in dist/_SassyLists.scss, and it should not. It works fine with the npm build command. I find this weird.