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

Avoid fixed paths for assets #52

Open
avdv opened this issue Apr 30, 2015 · 0 comments
Open

Avoid fixed paths for assets #52

avdv opened this issue Apr 30, 2015 · 0 comments

Comments

@avdv
Copy link

avdv commented Apr 30, 2015

In our project, we need to relocate the /assets path to somewhere else because we're dealing with assets as our main model. So, the /assets/<id> is a route used for managing our assets, not loading auxiliary static files.

That's why we relocated the /assets in the Brocfile.js to another place:

var app = new EmberApp({
    vendorFiles: {
        'handlebars.js': null
    },
    outputPaths: {
        app: {
            html: 'index.html',
            css: {
                'grid': '/static-assets/overboot.css',
                'app': '/static-assets/app.css'
            },
            js: '/static-assets/app.js'
        },
        vendor: {
            css: '/static-assets/vendor.css',
            js: '/static-assets/vendor.js'
        },
        testSupport: {
            css: '/static-assets/test-support.css',
            js: {
                testSupport: '/static-assets/test-support.js',
                testLoader: '/static-assets/test-loader.js'
            }
        }
    }
});

Unfortunately, ember-cli-blanket has the path hard-coded and does not use the app.config.outputPaths settings and the build fails with:

Merge error: file static-assets/test-loader.js exists in /src/adam/tmp/funnel-output_path-Co6s3qzY.tmp and /src/adam/tmp/funnel-output_path-YOwdW5CO.tmp
Pass option { overwrite: true } to mergeTrees in order to have the latter file win.

For the same reason, installation using ember install ember-cli-blanket fails silently because it does not find the '<script src="assets/' + this.project.config().modulePrefix + '.js"></script>' line in tests/index.html nor the '<link rel="stylesheet" href="assets/test-support.css">'.

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

1 participant