question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow 'index' to be a possible file to import

See original GitHub issue

It would be great to allow an index.scss file to be imported if a directory is found. Example

@import "./fruits"

If ./fruits is found to be a directory, it would look for ./fruits/index.scss or ./fruits/index.sass.

The reason behind this is to make it easier to consume packages containing Sass files. For example.

Screen Shot 2013-03-20 at 11 07 41 PM

We can then download packages into a directory, add that directory as a single load path and then in our main file we can easily do:

@import "nib-styles-common";
@import "nib-styles-dialog";

Which is a little neater than any alternative.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Reactions:60
  • Comments:33 (5 by maintainers)

github_iconTop GitHub Comments

12reactions
jslegerscommented, Mar 30, 2014

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.

6reactions
milesjcommented, Jan 1, 2016

I’m very sad this is still not in?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable Indexes and Constraints - SQL Server
Right-click the index you want to enable and select Rebuild. In the Rebuild Indexes dialog box, verify that the correct index is in...
Read more >
ES6 exporting/importing in index file - javascript
I exposed in the index file in this way: import { Schema ... index.js";. This would allow each exported module to be imported...
Read more >
Using index files when working with Sass and @use rules
A new way to import#. Before the @use at-rule was introduced to Sass, we relied on importing things (mixins, variables, stylesheets) with the ......
Read more >
Using index.ts file to organize import statements.
We can import more than one component, module from same import statement even though they are in different .ts files. This is possible...
Read more >
DocFetcher - Import an old index file to a newer version
I would like to know, if it is possible to just copy a index file from ... there are currently no plans to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found