-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add _index.scss resolution when using @import on a directory #2339
Comments
The support has landed in libsass with sass/libsass@3af837c but won't be available here till the next libsass tagged release is brought into node-sass |
Any timescales on that @nschonni ? |
Seconding @matt3224 here. Is there a timeline on this feature? |
Libsass was bumped in 4.9 9d6faf6 so this should be available |
Actually doesn't look like it was https://github.com/sass/node-sass/blob/master/src/libsass/src/file.cpp |
It still doesn't work. :( I've generated angular project with To the point, am receving such error after attempting to import file called '_index.scss' from directory 'src/styles'.
|
Doesn't work for me too. ( I invented this hack: For exapmle Then I import like that: |
I'm looking for this too. Just tested the current version of |
Just looked into this more. Looks like libsass has the change required in 3.6, but that hasn't been released yet. Looks like we're waiting for 3.6 to be released first. sass/libsass#2772 (comment) says it'll be released around Xmas, so converting from internet time, we'll have this feature by June. |
libsass 3.6 got released just under a week ago. How fast can we release a new version of node-sass that uses libsass 3.6? |
It'll be a couple weeks..it's a complicated process and I'm off on vacation
till the end of June.
…On Fri., 24 May 2019, 4:34 am PolyPik, ***@***.***> wrote:
libsass 3.6 <https://github.com/sass/libsass/releases/tag/3.6.0> got
released just under a week ago.
How fast can we release a new version of node-sass that uses libsass 3.6?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2339?email_source=notifications&email_token=AAENSWDKVVHQXRGXYBLPF43PW3PSNA5CNFSM4E3WV7XKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDDI6Q#issuecomment-495334522>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAENSWBDQETGJXL7DMTKUF3PW3PSNANCNFSM4E3WV7XA>
.
|
June was a pretty good estimate (fingers crossed) |
So is this change to libsass 3.6 going to be a minor release or a major release? |
@xzyfer Do we have an ETA on this improvement? |
so the documentation https://sass-lang.com/documentation/at-rules/import#index-files lies saying it's available in "LibSass since 3.5.0"? I'm trying to make it work with |
There seems to be a drought of commits and PRs. |
Any updates? |
I would actually like to see this thing being configurable but with a fallback to |
@metaa that would be a feature request to sass/sass to change the language |
Still not in node-sass 4.13.0, either, even though the docs made me believe it would work. |
@payneio which docs? |
Have you tried switching to dart sass. I use this now on all projects, has index feature. |
Ahh, @saper, now, I see https://sass-lang.com/documentation/at-rules/import#index-files indicates "LibSass since 3.6.0". Looking into what is packaged with node-sass, it looks like it is currently 3.5.0. I assumed if I downloaded the latest node-sass that it would work. Is there any way to get node-sass with LibSass 3.6.0? |
@xzyfer Indicated that it wouldn't be a quick upgrade. If someone else wants to attempt the upgrade, submit a PR. |
Turns out June was a terrible estimate |
you can use _.scss instead of index.scss like this |
Is there documentation explaining how node-sass is built? I intend to upgrade the libsass version myself if @xzyfer will not do it. I know it involves using node-gyp to build libsass and then there are bindings that make libsass work with NodeJS. However a more or less official explanation would still help a lot. |
@PolyPik you can build node-sass with a pre-built libsass using
Alternatively, you can update the source in the node-sass directory as checked out from git in Before you build the binding, please update package.json "libsass" value to indicate the version of the libsass you are using, possibly with some indicator this is your change. Of course - any problems resulting from this remain your own... |
Also what branch should I make these changes to when I fork the repo? The master branch? |
@PolyPik currently v4.13.1 release tag and the master branch are almost identical as we speak, |
There is also the v5 branch, which is only 4 commits behind master. Perhaps that branch should be rebased on the v4.13.1 tag and then have the libsass update be a commit on the v5 branch. |
Your call, @PolyPik |
I have managed to merge the latest master branch changes into branch v5, updated the libsass subtree to 3.6.3 in v5, and successfully built the libsass library after adjusting the libsass.gyp file. Some of the tests are obviously going to break and this is where I am at. The api.js tests were a relatively easy fix (there was just one issue and it was with the I tried upgrading the sass-spec version to 3.6.3 hoping to fix the issue, but then I realized that at some point in the past, the sass-spec repo did away with separate input and output files. Instead the input and output values are contained within one .hrx file. Which means if I were to change the version, the test file must also be changed to be able to properly read the spec files. EDIT: Nvm about the expected and the actual values appearing identical. I just noticed some of the differences. EDIT2: As it turns out the sass-spec repo didn't completely do away with separate input and output files. Some testcases still have separate input.scss and output.css. IMO this makes things even more difficult. |
Which part of libsass is response for the error message of the following format? One of the spec tests (libsass-closed-issues/issue_2446) is failing due to the error message being I have grepped the source files in order to find where that message originates but it just doesn't seem to exist even in libsass 3.5.5. EDIT: Nvm I don't that it is the fault of libsass. |
https://github.com/sass/libsass/blob/3.5.5/src/parser.cpp#L109 Can we move it to the v5 / upgrade libsass issue? |
Nvm, I found the real cause of the failing issue_2446 test. I adjusted the spec.js to account for this change in structure. It fixed that test and issue_245443, but now other tests just broke as a result that change. |
It.is.done. |
@PolyPik hooray! Does that mean that this will arrive soon? EDIT: Please interpret this as excitement rather than pressure :) |
It.is.merged. |
I have hit a point where this would be really useful for myself and the team. Take a look at sass/sass#690
Theres a fair bit of discussion resolving with the addition of this feature, I am wondering if this is on the radar and when it will be available.
Thanks!
The text was updated successfully, but these errors were encountered: