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

Ember-cli-eyeglass ignores OutputPath #225

Open
1 of 3 tasks
igbopie opened this issue Mar 12, 2019 · 3 comments
Open
1 of 3 tasks

Ember-cli-eyeglass ignores OutputPath #225

igbopie opened this issue Mar 12, 2019 · 3 comments

Comments

@igbopie
Copy link

igbopie commented Mar 12, 2019

Package
This issue is related to the following monorepo package(s):

  • eyeglass
  • broccoli-eyeglass
  • ember-cli-eyeglass

Description
Ember-cli-eyeglass does not respect outputPath configuration like the example in ember docs:

https://ember-cli.com/user-guide/#configuring-output-paths

To Reproduce
Steps to reproduce the behavior:

  1. Add outputPath configuration
  2. css file does not appear in the right location

Expected behavior
Css file should show in the right location

@stefanpenner
Copy link
Member

Could you provide a more detailed example. As that way we can see exactly what you are expecting (input/output).

As eyeglass allows for some additional conventions, it may not be possible to preserve the above semantics in all scenarios. By seeing yours we can provide a more accurate response/fix/idea/doc-fix

@igbopie
Copy link
Author

igbopie commented Mar 12, 2019

Sure,
in the example provided

 outputPaths: {
      app: {
        html: 'index.html',
        css: {
          'app': '/assets/css/application-name.css'
        },
        js: '/assets/js/application-name.js'
      },
      vendor: {
        css: '/assets/css/vendor.css',
        js: '/assets/js/vendor.js'
      }
}

the file application-name.css won't appear under assets/css but assets.

The problem is that here:

let cssDir = outputPath.slice(1) || './';

it is taking outputPath variable which is always assets according to this code:

https://github.com/ember-cli/ember-cli/blob/ef3b0e3626dce3ea40732c9227c5b806f1480302/lib/broccoli/default-packager.js#L608

Instead, the fourth parameter should be used which includes the 'outputPaths' specified in the config.

@chriseppstein
Copy link
Contributor

@stefanpenner IMO, preprocessors shouldn't have to know the internals of ember-cli's configuration. IMO eyeglass should translate *.scss to *.css and then ember-cli should do these renames on the css files according to the config that it is in charge of implementing.

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