Git Product home page Git Product logo

ember-cli-rails-assets's Issues

PR #15 breaks on stylesheets not in the local filesystem

The change from #15 breaks when a stylesheet or javascript file is pointing to a non-local location:
Screenshot 2024-06-28 at 10 07 13 AM

I imagine I could probably put a testcase together to detect this bug, I don't think it is present on 0.6.2 for anyone else who might be running into it after upgrading ember-cli-rails-assets.

media option no longer works for include_ember_stylesheet_tags helper

In order to support certain print stylesheets, we previously added media: all to the helper call, namely "<%= include_ember_stylesheet_tags :client, media: 'all' %>". This no longer works in the >= 0.6.x releases, and fails with:

ActionView::Template::Error:
wrong number of arguments (2 for 1)

If I understand the problem, we need to be able to specify a media option similar to the prepend option that was added, so that print stylesheets continue to function.

Requiring <base> tag affects whole page

Adding a <base href="/"> tag to <head> affects relative URLs for the whole page. This includes breaking SVG <defs> fill URLs and <a href="#top"> style page anchors as well. This seems like an unacceptable side effect when the goal is only to have an absolute URL for the Ember asset paths.

Would it be possible to just add a secondary argument to include_ember_script_tags() to pass in the base path?

Unable to use CSS files that are more than one level deep in the assets folder

We have a CSS file in the public directory at the following path:

assets/font-awesome/css/font-awesome.css

In the index file it's referenced as:

<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css" />

This was failing because of the new code here that eagerly grabs all the CSS files:

Nokogiri::HTML(index_html.read).css('link[rel="stylesheet"]').map {|s|
filename = File.basename(s['href'])
asset_matching(/#{Regexp.escape(filename)}\z/)
}

However, when it gets here, it fails, because the file isn't in the asset map. The DirectoryAssetMap right now only looks at children and not the full tree.

https://github.com/seanpdoyle/ember-cli-rails-assets/blob/master/lib/ember_cli/assets/asset_map.rb#L36

I submitted a PR here: #23

Please release a new version

Any released versions of ember-cli-rails-assets don't work with Rails 7.
To work with Rails7, #14 is required.

@seanpdoyle
Could you release a new version?
If you add me to GitHub / RubyGems collaborator, I'll do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.