Comments (19)
I will look into that soon
from minify.
@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.
@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.
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.
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.
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.
Thanks, and I sure can. I'll let you know once I have gotten it.
from minify.
Yup, working!
from minify.
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.
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.
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.
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.
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.
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.
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.
from minify.
I really dont know, I dont have that problem over here. Do you have any idea how come?
from minify.
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.
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.
Your welcome. I've released an new version 2.0.2 where this feature is implemented. Again, many thanks!
from minify.
Related Issues (20)
- Call to a member function withFullUrl() on a non-object HOT 1
- composer failed (satisfiable by natxet/cssmin[3.0.x-dev]) HOT 2
- Abandonned HOT 5
- gzip files HOT 3
- Laravel 5 HOT 2
- Imported css are not included HOT 1
- customize final URL HOT 1
- Path is not currect in the website HOT 2
- base_url Not working ? HOT 1
- Relative img path HOT 2
- Bootstrap glyph icons not working after compression HOT 3
- Config environments not working HOT 1
- How to deal with relative urls for resources? HOT 1
- Getting an error HOT 2
- ErrorException in Minifier.php line 476: Unclosed string at position
- Laravel 5.1
- C-style JavaScript comments without a line break at the end of a file...
- Invalid regular expression: missing /
- duplicate path with option ->withFullUrl()
- Call to undefined method Illuminate\Foundation\Application::share() Laravel 5.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minify.