[SOLVED] How can I import a scss file into another scss using hanami compiler?

I have hanami v1.0.0 application with the folowing tree in apps/web/assets/stylesheets:

├── favicon.ico
├── fonts
│ ├── glyphs
│ │ ├── winjs-symbols.eot
│ │ ├── winjs-symbols.ttf
│ │ └── winjs-symbols.woff
│ ├── LICENSE.txt
│ ├── selawkb.eot
│ ├── selawkb.ttf
│ ├── selawk.eot
│ ├── selawkl.eot
│ ├── selawkl.ttf
│ ├── selawksb.eot
│ ├── selawksb.ttf
│ ├── selawksl.eot
│ ├── selawksl.ttf
│ └── selawk.ttf
├── images
├── javascripts
│ └── app.js
└── stylesheets
├── win
│ ├── _resources.css.scss
└── winstrap.css.scss

I import my _resources.css.scss file in winstrap.css.scss:

@import "win/resources";

But I recieved next error when hanami tried to load my assets:

Sass::SyntaxError: File to import not found or unreadable: win/resources

How can I import _resources.css.scss file in winstrap.css.scss file?

@milovidov Hi!

You can add a the win directory to the sources inside the assets block in apps/web/application.rb.

@jodosha I added this path in apps/web/application.rb file:
sources << [
‘assets’, ‘assets/stylesheets/win’
]
but I recieved the same error.

Ok, I renamed _resources.css.scss to _resources.scss and this fixed my error without additional path.

1 Like

@milovidov Thanks for getting back.

That makes sense because it’s how SASS works.