Git Product home page Git Product logo

Comments (9)

flovan avatar flovan commented on August 12, 2024

I don't think there are any (gulp) modules that allow to only remove spaces, not all of the whitespace. Therefor "aligning to the left" is probably also not possible, as spaces or tabs are also considered to be whitespace. In my opinion, you either minify everything, or you don't minify at all.

But since you are using PHP, can you tell me if you are working with a framework? Or just good ol' inline PHP?

from headstart.

nunodotferreira avatar nunodotferreira commented on August 12, 2024

And to remove tabs and comments it's possible?

I'm using Laravel, and in some cases inline PHP!

from headstart.

flovan avatar flovan commented on August 12, 2024

Comments are doable, but this would mean expanding the config.json or adding a new config file somewhere and I'm not willing to force everyone that uses Headstart into that. Tabs can't be specified through the module I'm using for minifying at the moment. It's all just "whitespace"..

But, it so happens we are using Laravel where I work, and Headstart supports a rudimentary form of integration so the two can be used simultaneously. It requires some changes, but we have built quite a few projects successfully by doing so.

In short, Headstart moves the files over to any specified folder and hands the templating over to Laravel. This also means you can put in your Laravel tags and plain PHP inside of the unminified templates files, only to minify them afterwards, when you don't need to touch them anymore.

from headstart.

nunodotferreira avatar nunodotferreira commented on August 12, 2024

That's ok.
Next project i'll try to work with this for Laravel.

Mean while i'm using htmlcompressor.com that do what i want.

from headstart.

flovan avatar flovan commented on August 12, 2024

Sorry that I couldn't help you right away though. But let me know if you have any questions on the Laravel integration. I don't know if anyone else ever tried using the guide I put on the website, so it might need some improvements.

I will put a version milestone on this issue so I can revisit it for a future release.

from headstart.

flovan avatar flovan commented on August 12, 2024

Kinda fixed it, so closing as this is all I can do to give you some options. Will be included in v1.3.

from headstart.

nunodotferreira avatar nunodotferreira commented on August 12, 2024

Hi, just one example of what i'm trying to explain!

http://htmlcompressor.com/compressor/

I just saw what you did with some options for the v1.3, but this example(htmlcompressor) don't merge lines in html, and the script stays more readable!

Is that a way of doing this? did you try it?

from headstart.

flovan avatar flovan commented on August 12, 2024

Setting collapseWhitespace: true in the upcoming version, would equal to checking "Single line html output" in the Htmlcompressor. So if you would set that to false you would maintain readable code.

Again, sorry for the long waiting. I have next to no time to work on Headstart 😢 Even though I want to..

from headstart.

nunodotferreira avatar nunodotferreira commented on August 12, 2024

That's good news! 👍
I think that headstart it's almost fine, some minor issues and updates.
For me it's a good way of doing my job. thanks again

from headstart.

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.