Comments (5)
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.
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.
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.
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.
Thanks for the reply !
I'll be looking into it.
from hugulp.
Related Issues (20)
- Add docker support HOT 1
- having problem with reference task HOT 1
- Stuck in infinite loop on Ubuntu HOT 4
- UnCSS support HOT 3
- Source Map HOT 2
- Unable to minify Javascript error HOT 1
- HTML minifying HOT 1
- .hugulprc HOT 2
- Update code and variables
- Put all hard coded files/directories into an array
- Support .sass files in addition to .scss
- hugulp next HOT 1
- CSS and JS not minified HOT 7
- JavaScript Concatenation? HOT 4
- Allow json extension for config file
- Update to Gulp 4 HOT 1
- Support for standardjs or custom eslint-config
- hugulp reprocesses images already compressed or optimized by hugulp HOT 1
- No stylesheets generated? HOT 3
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 hugulp.