Flowtype has a small set of features focussed on typechecking. It is a superset of JavaScript. It can be transpiled to JavaScript by simply stripping the type annotations. It allows you to specify types almost as little or as much you like. It becomes more powerful the more detail you specify. So you can easily leave some or most of your code with no type specifications.
Here are my recently learnt tips for advanced usage of the wonderful Webpack
--hot
does not do would you would expect. webpack --watch
and webpack-dev-server
do what you'd expect --hot
to do, even without that option.--lazy
stops WDS from doing what you'd expect --hot
to do.--hot
allows modules (files) to be updated in place, without reloading the webpage.This is one of my favourite blog posts of all time. It is no longer published, but I found it on the wayback machine (internet archive). I am reposting it here for your enjoyment. I hope the original author doesn't mind.
Originally by By Dan Lee, 9 September 2010.
The typical beginning of an Enterprise Developer’s JavaScript education is involuntary in nature. In many cases an engineer with a strong background in Java, or other strongly-typed languages, is informed that their next project requires JavaScript. Like all forced actions, this will be a bumpy road. So bumpy in fact, that the Enterprise Developer will go through a grieving process as they leave behind their beloved strongly-typed language and plunge into the duck-typed world of JavaScript. This process of grief has four distinct stages.
As I discussed earlier, the Enterprise Developer’s usual introduction to JavaScript is less than stellar. Rightly so, when a developer hears that the next ‘Big Project’ will be done in JavaScript, their first thoughts are of the skeptical variety.
jQuery for Designers and Themers is a fun interactive session at DrupalCon San francisco on getting started with jQuery. It is targeted at designers and themers but is suitable for anyone with a decent understanding of HTML and CSS — no programming experience is necessary. It doesn't include any PHP, and only basic programming concepts are introduced.
The session is early on Tuesday 20 April in room 307 (Commerce guys) at DrupalCon SF at 8:30am.
I was extremely pleased with my DrupalCon Paris session on jQuery for Designers and Themers. It was a great success – my best session yet.
You can see the slides at tinyurl.com/jQuery-Designers and download the sample theme code from drupal.org/project/jq4dat.
I made a couple of references to blog posts and work I've done with jQuery during the session:
drupal_get_js()
and drupal_get_css()
from page preprocess functions creates an unnecessary performance hit. This blog post discusses a technique that allows javascript and CSS to be added in the page preprocess function without needing to call drupal_get_js()
and drupal_get_css()
.