Top of page

Fighting front-end fatigue with tooling recipes

Blog

How to be productive with the latest web technologies

Why not Less, Sass, Webpack, Browserify, Angular, React, Preact, Vue…?

We chose these technologies for a reason. It’s unavoidable that browser software lags behind the specifications and recommendations for HTML, CSS and JavaScript. So, many developers choose to ignore the spec and develop all kinds of compelling tech — so that others can build impressive stuff on top — but we prefer to use technology that only bridges the gap between the specifications and the browser’s adoption rate. As soon as browsers catch up, we take out the middleware. This keeps our tech stack clean and simple and our technical debt at a minimum.

1. Next-gen CSS with PostCSS

The latest additions to the CSS spec enable us to write more effective stylesheets. We can use CSS variables (or custom properties as they’re officially called), color functions and advanced calculations. Using @import lets us write modular CSS — but unless you use Server Push, it comes with a performance penalty: the page is blocked from rendering while downloading of all those CSS files. Also, older browsers don’t know what to do with all these new CSS features. That’s where the PostCSS process and watch recipe comes in.

Ingredients

  • Bundles your CSS (meaning, you can use @import freely);
  • Substitutes variables with their values, pre-calculates colors and dimensions;
  • Adds sourcemaps for debugging;
  • Adds fallbacks and vendor prefixes for cross browser compatibility;
  • Has a watcher for development;
  • Minifies your CSS for production.

2. Lightweight, modular ES6 with Rollup

With the ES2015/2016 additions to the JavaScript language, we can write more powerful and expressive scripts. ES modules finally gave us a standardised way to write modular JavaScript. Sadly, browsers don’t quite know how to load ES modules. And when a browser doesn’t know an ES feature, it will throw and error and break your website.

With the Rollup bundle and watch recipe we can bundle our ES modules for the browser and transpile new ES2015/2016 features to ES5 code. This way we can write modern JavaScript and turn it into something all browsers understand.

Ingredients

  • Bundles your ES modules and imported CommonJS and UMD modules into a single file;
  • Transpiles ES2015/16 JavaScript into ‘old’ ES5 JavaScript;
  • Creates lightweight output;
  • Watches and lints your changes during development, with sourcemaps for debugging;
  • A build task that minifies your scripts for production.

3. Express with Node­mon and Browsersync

Node.js with Express is our server technology of choice. While we’re developing we want to see the changes we make as quickly as possible — regardless of changes to server or browser code. At the same time, we want the site to be highly performant in production. Our recipe for Express with Nodemon and Browsersync solves both cases.

Ingredients

  • Nodemon ensures the server restarts on every change during development;
  • Browsersync provides a proxy of the Express server with auto reloading on browser file changes;
  • Allows access to the site from other devices on the network;
  • In production mode, caching and compression are enabled for fast page loads.

What’s for dessert?

We are steadily cooking up more recipes and already have a few more available:

Go ahead and give them a taste. I hope they cure your fatigue and help you enjoy the latest the web has on the menu ;)

← All blog posts

Also in love with the web?

For us, that’s about technology and user experience. Fast, available for all, enjoyable to use. And fun to build. This is how our team bands together, adhering to the same values, to make sure we achieve a solid result for clients both large and small. Does that fit you?
Join our team