You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow 'index' to be a possible file to import #690
Not really. It more like an alias. It could theoretically live anywhere. If Sass packages all do this then there is a guaranteed, single entry point for every library.
I think we should make this part of 4.0 when we add our module system. it
may be better to use a different file name than "index" that is in keeping
with whatever we come up with for our modules. E.g. _module.s[ac]ss.
Sass Globbing: imports all files in a directory or directory tree
Index Importing imports only the index (or whatever naming convention is used) in a directory, reducing functionality but enforcing a uniform rule
If this rule would be for all stylesheets, including site/application stylesheets, _style might be better — index is an odd conflation with html. Chris's suggestion _module works too.
index is nice because it's consistent with conventions used by other languages, but we would want it to be a partial. _index is less similar, so _module might be a better way to go for that reason.
Reacted by Cosmin Ababei, Adonis Kakoulidis and Camilo
I only suggested index because that is what I'm used to with node and Component. The name doesn't particular matter too much. It would be nice to get this before 4.0 as it seems like it could be trivial to implement and would make using Sass with tools like Bower and Component easier.
@robwierzbowski Globbing won't really work with a module system though. Modules should have a single entry point where they 'export' what consumers need.
Some people would prefer the name _module.scss. Others would prefer _index.scss, _style.scss, _component.scss, _loader.scss or something else.
It would be great if the name of the index file could be configured, so we could all use our own personal preference.
Reacted by Tong Chia
Reacted by Francisco Presencia, Jónatan Núñez, Guilherme Ventura, Misael Taveras, Jeff Fairley, Andrea, Scott Cox, Daniel O’Connor, Oleksandr Kravchenko, Lars Berger and 1 more
Activity
anthonyshort commentedon Mar 20, 2013
I attempted to do a pull request for this, but alas, my skills are weak 😢
chriseppstein commentedon Mar 20, 2013
I love this idea.
nex3 commentedon Mar 22, 2013
This seems reasonable to me.
robwierzbowski commentedon Mar 22, 2013
Isn't this basically Sass globbing?
anthonyshort commentedon Mar 22, 2013
Not really. It more like an alias. It could theoretically live anywhere. If Sass packages all do this then there is a guaranteed, single entry point for every library.
chriseppstein commentedon Mar 22, 2013
I think we should make this part of 4.0 when we add our module system. it
may be better to use a different file name than "index" that is in keeping
with whatever we come up with for our modules. E.g.
_module.s[ac]ss.robwierzbowski commentedon Mar 22, 2013
I think I see your point. So the difference is:
If this rule would be for all stylesheets, including site/application stylesheets,
_stylemight be better —indexis an odd conflation with html. Chris's suggestion_moduleworks too.nex3 commentedon Mar 22, 2013
indexis nice because it's consistent with conventions used by other languages, but we would want it to be a partial._indexis less similar, so_modulemight be a better way to go for that reason.anthonyshort commentedon Mar 23, 2013
I only suggested index because that is what I'm used to with node and Component. The name doesn't particular matter too much. It would be nice to get this before 4.0 as it seems like it could be trivial to implement and would make using Sass with tools like Bower and Component easier.
anthonyshort commentedon Mar 23, 2013
@robwierzbowski Globbing won't really work with a module system though. Modules should have a single entry point where they 'export' what consumers need.
robwierzbowski commentedon Mar 23, 2013
@anthonyshort You're totally right. Took me a min to get my head around it.
robwierzbowski commentedon Apr 25, 2013
After working with node fort a few weeks, I take back my objections to _index.scss. Of all the options it's now the one I prefer the most 😄.
nwhittaker commentedon Dec 29, 2013
+1
grant commentedon Jan 28, 2014
Totally wish I had this feature right now...
jslegers commentedon Mar 30, 2014
Some people would prefer the name
_module.scss. Others would prefer_index.scss,_style.scss,_component.scss,_loader.scssor something else.It would be great if the name of the index file could be configured, so we could all use our own personal preference.
17 remaining items
silvandiepen commentedon Jul 30, 2017
Indeed still waiting for this feature. The setup is already ready, only the urls in the main app.scss have to be altered. When is this coming?
nex3 commentedon Jul 30, 2017
I think the labels pretty clearly indicate the status of this proposal: we like the idea, but we don't have the resources to devote to it at present.
Add support for _index files (#2456)
Add support for _index files (#220)
Add specs for _index files (#1206)