
Some gulp tasks watch over all the files, generate the css, js and browsersyncs. When developing we have a express server generating the html. To make this possible Flamingo rewrites the JavaScript to Go, on the fly.We are building a design system and styleguide with pug. This allows frontend developers to use known a syntax and techniques, instead of learning a complete new template engine. The Pug Template engine compiles a subset of JavaScript (ES2015) to Go templates. Nevertheless, extensive usage of JavaScript is not advised. Please note that these function have to use reflection and it's up to the implementation to properly reflect the functionality and handle different inputs correctly. However, it is possible to recreate such functionalities in a third-party module via Flamingo's template functions.įor example pug_template itself has a substitute for the JavaScript Math library with the min, max and ceil functions. Only snippets of JavaScript code can be run. While this works for most standard statements and language constructs (default data types such as maps, list, etc), it does not support certain things such as Object Oriented Programming or the JavaScript standard library.

The pug_template module takes this JavaScript and uses the Go-based JS engine, otto, to parse the JavaScript and transpile it into Go code. var prefix = 'foo _ ' ul each val, index in Module `flamingo-carotene-webpack-svg-sprite` Module `flamingo-carotene-smooth-scroll-to`
