GithubHelp home page GithubHelp logo

Comments (5)

jbrodriguez avatar jbrodriguez commented on July 24, 2024

Autoprefixer doesn't appear to run during watch, only during build

The idea is that autoprefixer is an 'enhancement/optimization', so it runs during the build step which is where you optimize the site.

If you run automated tests, you could still run them against the full build (public folder).

I now check in static/images and since I'm using sass, check in assets/styles, and addtionally assets/javascript

Not sure about which artifacts in static you refer to or about the previews.

from hugulp.

levidrain avatar levidrain commented on July 24, 2024

Perhaps my workflow needs work. Currently, I start hugulp in watch mode, and hugo server -w. I'm usually tweeting styles and html and checking the results.
I'm using flexbox for layout, which still requires browser prefixes for some properties. Which means the site doesn't layout correctly unless i do a full build.
We use Forestry.io which is a web CMS on top of hugo. However, they expect all the css to be in a final state and checked into the static folder. Since their preview functionality doesn't run the optimization, the preview displays without prefixes as well.

I don't really think of prefixing as an optimization. To me, optimization doesn't alter the behavior of the assets, they just shrink their size. Prefixing potentially changes the behavior of css, since you could have a pretty different results in browsers without them.

from hugulp.

jbrodriguez avatar jbrodriguez commented on July 24, 2024

I don't really think of prefixing as an optimization

I can see where you're coming from and now that you mention it, it makes sense.

I had thought about having separate pipelines, one for build and one for watch.

Maybe this builds up the case to do it.

Have you looked at the code / thought about what changes you would make ?

from hugulp.

levidrain avatar levidrain commented on July 24, 2024

Let me start by saying I love the tool. Version 2 has been great asset for us.
The only suggestions I have are:

  • the css prefix issue mentioned in this thread
  • we use bulma.io installed via npm, so our sass file has imports like, "../../../node_modules/bulma/bulma". Some of the other build steps allow configuration to be passed. It would be a nice to have to pass sass include folders.
  • it would be useful to make js-linting an optional step in the pipeline. There's lots of languages that transpile to js and for those linting isn't as useful.

from hugulp.

jbrodriguez avatar jbrodriguez commented on July 24, 2024

Thanks for the reply !

I'll be looking into it.

from hugulp.

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.