Expose all variables in a Twig template in Symfony

Ever worked on a big framework and been new to it.. then you have to somehow figure out a twig tpl without know what variables have been passed?

 

Simple solution, dump all the var keys in the twig tpl:

Nodejs, ecmascript6 and Webpack. All mixed together with babel.

After building a few Ang2 apps with typescript and Vue2 JS with the old Webpack… when I was looking back at some NodeJS Apps I was supporting, writing in the old es5 wasn’t sitting too well anymore.

So.. what else other than to write a webpack script to enable writing es6 on the node lts release:

You will need to add a few things to your package.json too:

 

And of course a babelrc file:

And, if like me you are now totally hooked on well written code and layout then a eslintrc file too:

 

(like i said in the about page of this blog, this is more a Wiki for me than for the rest of the world. These posts are therefore a little sparse on notes. But the best place these days for webpack info is on webpack it’s self: https://webpack.js.org/configuration/)