Skip to content
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

Error when import scss file to main scss file. #28

Closed
huyle2607 opened this issue May 17, 2017 · 11 comments
Closed

Error when import scss file to main scss file. #28

huyle2607 opened this issue May 17, 2017 · 11 comments
Milestone

Comments

@huyle2607
Copy link

I'm currently using Pingy for a simple project. I tend to divide scss file into multiple files then import it to a sort of main.scss file, it's easier for maintenance later. But I encounter a problem that when I save in child file, it said error. When I open main.scss file and save, everything worked fine.

Here is the error
screenshot_1

Here is my structure for the styles folder.
screenshot_2

@davej
Copy link
Member

davej commented May 17, 2017

What is your import code like? Did you include the underscore (_) in the import?

@huyle2607
Copy link
Author

huyle2607 commented May 17, 2017

No! It's something like this
@import './fonts';
@import './404';

@davej
Copy link
Member

davej commented May 17, 2017

Shouldn't it be this instead?

@import './_404';

@huyle2607
Copy link
Author

It worked! But I have to save on _404.scss then back to main.scss and save one more time. It did not watch the _404.scss file :|

@davej
Copy link
Member

davej commented May 18, 2017

Hmm but if you restart the pingy dev server then it works ok again and watches the correct files, right?

@maxcaluva
Copy link

I'm doing it like this and it works for me

image

@S3B4S
Copy link
Contributor

S3B4S commented Aug 10, 2017

Unfortunately I have the same issue, I've tried multiple things, even recreating @maxcaluva his project structure but pingy doesn't watch the partials for me. I have to go back and save at main.scss if I want to have my changes in the partials to be compiled.

Project structure:

├── index.html
├─┬ scripts
│ └── main.js
└─┬ styles
  ├─┬ components
  | └── _contact.scss
  └── main.scss

@import "./components/contact"; is used inside main.scss

Sidenote (minor issue): The first save never seems to work for me, wherever used, after that the second save and onwards will compile the scss.

@davej
Copy link
Member

davej commented Aug 10, 2017

I'm in the process of creating a complete end-to-end integration test for Windows and Mac. Currently, I have a ton of unit tests but they don't test anything in an actual browser. When this is finished, it should mean more solid releases.

As soon as the new test suite is ready then I will circle back around to this issue and a few others. Thanks for your patience.

@davej davej added this to the v0.8 milestone Sep 26, 2017
@davej
Copy link
Member

davej commented Sep 27, 2017

@S3B4S: Hoping this has been fixed for you now. Could you retest using Pingy 0.8.1, let me know if you're still having problems and I'll reopen this issue.

@davej davej closed this as completed Sep 27, 2017
@S3B4S
Copy link
Contributor

S3B4S commented Oct 13, 2017

Sorry for the delay in the response, everything seems to be resolved. Good job! 👍

@davej
Copy link
Member

davej commented Oct 13, 2017

@S3B4S great, thanks for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants