Coder Social home page Coder Social logo

Comments (19)

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

I will look into that soon

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

@mcordingley Could you check the develop branch? I've just pushed this feature. Can you check if this is what you're looking for? I als updated the README file on the develop branch.

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

@ceesvanegmond Not quite. From looking at the code in there, you do have an $attributes property that seems to go into rendering the HTML tag, but it operates on an instance of the class. That's tricky to use when using this from the facade in a Laravel template or layout. At least from the perspective of using this from Laravel, I'd like to be able to do something like this:

{{ Minify::css(array('/css/some-library.css', '/css/screen.css'), array('media' => 'screen')) }}
{{ Minify::css('/css/print.css', array('media' => 'print')) }}

Emphasis is, of course, on that second parameter.

Does this make better sense? Apologies for how uninformative the first post was. It was late at night and I had just deployed some code that had used the older version of this. (And updated to this new version to try to handle some inexplicable JavaScript minification bug.)

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

I can build it like you've described, but I wonder why you want it the way you've described it and the way it is right now. Can you explain yourself in more detail and the difference from your perspective?

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Would you be amenable to a phone conversation on it? I think we're each missing something that the other is trying to say and I find text to be awfully constricting when a conversation gets complex.

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

I've updated the development branch to use your way. I do think this is an better way to set custom attributes. Could you test it for me?

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Thanks, and I sure can. I'll let you know once I have gotten it.

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Yup, working!

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

One thing, not sure if this is a bug or intentional for testing purposes in your develop branch, but the concatenation/minification is happening for my "local" environment, which I have explicitly added to the configuration as one of the ignore_environments

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

Ah! I see the problem, I forgot to add an return. I did that in the latest commit on the development branch. If it works I will merge it with master.

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

I updated my local environment and visited a page on it. I am now correctly getting unminified files for local. (Yay!) I also commented out "local" in the ignore_environments array, so that it is now explicitly defined to be empty and tried loading the page again, but am still getting unminified code.

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

Mm, when i comment out line config.php and that seems to work fine on my machine. Have you set the environment correctly?

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Yup, this is definitely "local" on my box. To be clear, I am setting
'ignore_environments' => array() in the Minify config file on my local
development environment and expecting Minify to output the built file
names but am instead getting the unminified component files.

On Mon, Apr 14, 2014 at 12:53 PM, Cees van Egmond
[email protected]:

Mm, when i comment out line config.phphttps://github.com/ceesvanegmond/minify/blob/develop/src/config/config.php#L16and that seems to work fine on my machine. Have you set the environment
correctly?


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-40390062
.

Michael Cordingley
740.707.7809

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Curiously, it still attempts to build the minified files; it just still outputs the individual tags. This is true whether "local" is commented out or not.

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Just made a new deployment to production. It does build and serve the minified files there. I wonder if there's some way that "local" is getting overridden to always do the full tags, in spite of what the config says, or if there's some issue where the config just isn't getting read.

http://imgur.com/y7Hm9

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

I really dont know, I dont have that problem over here. Do you have any idea how come?

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

I will close this issue, and merge develop with master. I've tested it on multilple Laravel builds and it works pretty well. Thx for the feedbak anyway!

from minify.

mcordingley avatar mcordingley commented on June 25, 2024

Sounds good. I'll try to run down what's happening on my end. Could just be some local misconfiguration or something. In any event, it's only a minor issue that I'm still experiencing, and it doesn't affect prod.

Thanks for all of your patience on this issue! 👍

from minify.

ceesvanegmond avatar ceesvanegmond commented on June 25, 2024

Your welcome. I've released an new version 2.0.2 where this feature is implemented. Again, many thanks!

from minify.

Related Issues (20)

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.