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

Sass includePaths #203

Closed
davearel opened this issue Jan 6, 2017 · 7 comments · Fixed by adopted-ember-addons/ember-cli-sass#150
Closed

Sass includePaths #203

davearel opened this issue Jan 6, 2017 · 7 comments · Fixed by adopted-ember-addons/ember-cli-sass#150

Comments

@davearel
Copy link
Contributor

davearel commented Jan 6, 2017

I'm having major performance issues with the sass compiler due to a bunch of linked bower and NPM packages. The solution is to limit the sass compiler to app/styles and explicitly defined includePaths. This is done by enabling the onlyIncluded flag in ember-cli-sass (see: ember-cli-sass#usage).

I have done this, and it's significantly faster. The problem is that I can't seem to include pod-styles. Can I include a particular path in order for ember-cli-sass to pick up the pod-styles?

@webark
Copy link
Owner

webark commented Jan 7, 2017

the pod-styles file ends up being a manifest that is just a series of import to the path of the other existing style files. I'd say the best way initially is to try to make sure the whole app directory is included.

@davearel
Copy link
Contributor Author

davearel commented Jan 8, 2017

Doesn't seem to work, still getting Error: File to import not found or unreadable: pod-styles.

@webark
Copy link
Owner

webark commented Jan 8, 2017

hmm. I'll get a dummy app set up with that and see what's going on.

@webark
Copy link
Owner

webark commented Jan 8, 2017

so it looks like with the onlyIncluded setting in ember-cli-sass is resetting the input tree here.

    inputTrees = [new Funnel('app/styles', {
      srcDir: '/',
      destDir: 'app/styles',
      annotation: 'Funnel (styles)'
    })];

Since we are, during the build process, creating some of these files and merging them into the style broccoli tree(node) it get's lost here and goes back to just the actual files. I think if we where to make a change to

    inputTrees = [new Funnel(tree, {
      include: ['app/styles/**/*'],
      annotation: 'Funnel (styles)'
    })];

instead, that would fix the issue, and be more of what they wanted. I'll propose that PR a little later when I get a chance, if you don't beat me to it, and see what they say about it. We'd want to make sure that it sill maintains the performance benefits that they where after with adopted-ember-addons/ember-cli-sass#140 I think it will, but @dmfenton might be able to confirm better then I could.

@davearel
Copy link
Contributor Author

davearel commented Jan 8, 2017

Thanks @webark, I tested this, works great. I submitted a PR.

@webark
Copy link
Owner

webark commented Jan 9, 2017

@davearel just merged your pr! Thanks for submitting it! If everything works out fine, feel free to close the issue if you have a chance to, otherwise i'll get to it tomorrow. Thanks again :)

@davearel
Copy link
Contributor Author

davearel commented Jan 9, 2017

All good! Thanks for your help, @webark!

@davearel davearel closed this as completed Jan 9, 2017
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

Successfully merging a pull request may close this issue.

2 participants