2

I am doing an ember build and I have 3 stylesheets that need to compiled into their own stylesheets.

This is how the ember-cli-build.js is by default

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    'ember-cli-foundation-6-sass': {
      'foundationJs': 'all',
    },
  });

And this is what I have tried but I don't see new files generated. The file paths are correct.

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    'ember-cli-foundation-6-sass': {
      'foundationJs': 'all',
    },
    css: {
      '/components/icons.data.svg': '/assets/icons.data.svg.css',
      '/components/icons.data.png': '/assets/icons.data.png.css',
      '/components/icons.fallback': '/assets/icons.fallback.css',
    },
  });

1 Answer 1

3

This section of the CLI docs might be useful: https://cli.emberjs.com/release/advanced-use/asset-compilation/#configuringoutputpaths

Basically you can set something like:

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    'ember-cli-foundation-6-sass': {
      'foundationJs': 'all',
    },
    outputPaths: {
      app: {
        css: {
          'components/icons.data.svg': '/assets/icons.data.svg.css',
          'components/icons.data.png': '/assets/icons.data.png.css',
          'components/icons.fallback': '/assets/icons.fallback.css'
        }
      }
    }
});

The keys on the left are not supposed to contain the extension, since postprocessing is supported, so I'm not sure about how your files are setup (if the ones you show have css extensions).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.