-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix #9412 - import Sass dependencies in vendor folder #9458
Fix #9412 - import Sass dependencies in vendor folder #9458
Conversation
Previous PR: foundation#9449 Changes: - Revert foundation#9430 - Make `normalize-scss` a dev dependency. - Copy Sass dependencies to `/_vendor/scss` and import them in Sass from there. Why not importing the Sass dependencies as real dependencies and from `node_modules`: we cannot assume the path to our real dependencies. Old npm versions store them in our `node_modules` folder, while newer versions store them in the `node_modules` folder of the root project.
@@ -6,10 +6,10 @@ | |||
*/ | |||
|
|||
// Dependencies | |||
@import "normalize"; | |||
@import "../_vendor/scss/normalize-scss/sass/normalize"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a bummer. Ideally you’d want ../vendor/normalize
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We could copy only the sass
folder to _vendor/
and rename it normalize-scss
.
It would give ../_vendor/normalize-scss/normalize
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @ncoden's second suggestion makes sense. I don't think we're going to be doing JS in this way (dependency there works a little better, if still pretty poorly), but it still makes sense to scope by package as we may end up with multiple files to selectively import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kball " second suggestion": do you mean this PR or my previous comment ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
../_vendor/normalize-scss/normalize
My workflow has always consisted of requiring foundation as a dependency in my project and then importing |
@oxyc The |
@ncoden doesn't the entry in |
@oxyc True. I mistaken it with |
Mistaken `.gitignore` with `.npmignore`. The `/vendor` directory should be ignored by git, not npm.
ba321a3
to
f61a7fb
Compare
@hugogiraudel @kball Finally, I import normalize with |
@hugogiraudel We still have issues with our Sass dependencies. Because of Bower does not have its own registry like NPM, and uses the Github one, it does not find The solutions we see for now is to:
What do you think ? Do you know how we could resolve this problem ? |
I think I would go with cherry-picked what you need from your dependencies while preserving link to original source in your documentation (SassDoc or whatever). That would make the building process easier and is likely to be enough for now. |
I just found a stupidly simple idea and submitted it to the rest of the team on Slack: Why do not simply provide a 📦
Also, the dependencies can change a lot during the developement, the dist file is changed only on new releases. @hugogiraudel What do you think ? Edit: I checked, and it is what you do with SassyLists. :) |
See also: the current temporary PR for Bower: #9469 |
Prepare a better way to handle SCSS dependencies. Revert: - foundation#9430: add normalize dependency - foundation#9458: import Sass dependencies in vendor folder - foundation#9469: [TMP] Fix Sass dependencies import for Bower
Prepare a better way to handle SCSS dependencies. Revert: - foundation#9430: add normalize dependency - foundation#9458: import Sass dependencies in vendor folder - foundation#9469: [TMP] Fix Sass dependencies import for Bower
Previous PR: #9449
Changes:
normalize-scss
a dev dependency./_vendor/scss
and import them in Sass from there.Why not importing the Sass dependencies as real dependencies and from
node_modules
:normalize-scss
has a different name between NPM and Bower. 😠node_modules
folder, while newer versions store them in thenode_modules
folder of the root project.