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

Compile/Watch .scss in components folder #87

Closed
jurekbarth opened this issue Feb 7, 2019 · 3 comments
Closed

Compile/Watch .scss in components folder #87

jurekbarth opened this issue Feb 7, 2019 · 3 comments

Comments

@jurekbarth
Copy link
Collaborator

Expected behavior

Sass get's compiled if there's no underscore and it should trigger a build if there's no underscore

Actual behavior

In case you include it in resources, it works when saving the entrypoint file.

Steps to reproduce

  1. Checkout project and just use it.
  2. Create a scss file somewhere in src/components/<componentname>/styles.scss
  3. Run npm start check for a compiled file.

Specifications

  • Biotope Version: 6
  • Node Version: 11
  • Operating System: Mac OS
@no-creative-name
Copy link
Member

no-creative-name commented Mar 12, 2019

If I grasped it right, the problem is that we check if the "currentFile.dirname" contains the "componentsFolderName" (in tasks/sass.js of biotope-build):

if (currentFile.dirname.indexOf(componentsFolderName) === 0)...

If you log "dirname" you can see that it only contains the direct folder, where the scss file is located. E.g. if there's a "main.scss" under "components/testComponent/", "dirname" is "testComponent".
Thus dirname does not contain "components" and the scss file doesn't get copied.

I'd gladly open up a PR with a fix, but I'm not aware of any possible parameters that contain the full path.

@jurekbarth
Copy link
Collaborator Author

Ah i guess it's fixed in Version 6 of biotope-build. Can you recheck and open a PR if it's still an issue?

@no-creative-name
Copy link
Member

You're right, works fine with biotope-build 6.0.0.

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

3 participants