Comments (9)
@Propaganistas Can you try the develop branch? I've added an new function.
Minify::stylesheet('/css/main.css')->onlyUrl()
You can also continue chaining
Minify::stylesheet('/css/main.css')->withFullUrl()->onlyUrl()
Is this something you can use to solve this problem?
from minify.
Hi @ceesvanegmond
Thanks for picking this up.
I've tried the develop branch but it seems that the onlyUrl()
method still outputs a <link>
tag?
from minify.
Are you sure? I tested it again and this is not the case here.
from minify.
Ah, after some additional testing I found that the new onlyUrl()
method still outputs a tag when the current environment is set to be ignored in config. In 'valid' environments the method is returning a relative path.
2 future works in my opinion:
- ignored environments should also return a plain url for consistency?
- maybe provide also a way to request an absolute url?
from minify.
@Propaganistas We could definitely build that, but what would the minifier return when you provider more than one one in stylesheet()
or javascript
?
from minify.
That's indeed a valid point; skip the first suggestion.
The absolute URL of the minified file could still be of use.
from minify.
@Propaganistas Do you have an proposal?
from minify.
Haven't tested it, but as far as I can see this can already be achieved by chaining withFullUrl()
and onlyUrl()
.
from minify.
I have merge the branch develop manually to have the onlyUrl().
For the ignored enviroments, the onlyUrl() will not work because the env is ignored, and there is no need for the CDN.
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.