This document discusses Wordless, a WordPress plugin that aims to standardize theme development. It provides default theme structures, initializers, and helpers to make projects more repeatable and familiar. Wordless also supports preprocessing languages like HAML, SASS, and CoffeeScript to write HTML, CSS, and JavaScript more efficiently. The document explains how these features help developers work across projects more quickly by enforcing conventions and structure.
14. Everyone is different
Every client has different needs.
Every team has different tools.
Every project is unique.
It’s very cumbersome to pass a project made
by a developer to another developer.
16. The problems we had
We have a team of 8 developers. That
means lot of different people with very
different coding styles.
We couldn’t move across projects quickly
and be agile and dynamic.
17. We needed conventions
We needed a more structured organization,
a “framework”: always know where to put
files and where to find them.
18. A better workflow
We want to make projects repeatable
and familiar. We like familiar.
19. Style guides, Wikis, Docs
๏ Kind of hard to write
๏ Very easy to forget
๏ Very easy to ignore
20. Style guides, Wikis, Docs
๏ Kind of hard to write
๏ Very easy to forget
๏ Very easy to ignore
We needed something else!
28. Wordless supports
✓ HAML for writing beautiful HTML
✓ SASS for writing concise CSS
✓ CoffeeScript for writing safer JavaScript
29. Your production server will just use PHP,
HTML, CSS and JavaScript. No worries!
Wordless automatically compiles
all these great languages for you.
30. HAML haml.info
A small language which compiles to HTML,
which fundamental principle is:
“Markup should be beautiful”
HAML makes markup templates faster to
write and easier to read.
33. SASS sass-lang.com
An extension of CSS3 which compiles to CSS
and adds nested rules, variables and mixins.
Compass is a SASS framework which adds
many mixins for browser compatibility.
36. CoffeeScript coffeescript.org
A little language that compiles to JavaScript,
which main motto is:
CoffeeScript takes the good parts of it and
makes you write better, safer and faster code.
“It’s just JavaScript!”
37. var fill = function(container, liquid) {
if (container == null){
container = "cup";
}
if (liquid == null){
liquid = "coffee";
}
return "Filling the " + container + " with " + liquid + "...";
};
var result = [], ingredients = ["coffee", "milk", "syrup", "ice"];
for (i=0; i<ingredients.length; i++) {
result.push(fill(ingredients[i]));
}
JavaScript
38. var fill = function(container, liquid) {
if (container == null){
container = "cup";
}
if (liquid == null){
liquid = "coffee";
}
return "Filling the " + container + " with " + liquid + "...";
};
var result = [], ingredients = ["coffee", "milk", "syrup", "ice"];
for (i=0; i<ingredients.length; i++) {
result.push(fill(ingredients[i]));
}
JavaScript
fill = (container = "cup", liquid = "coffee") ->
"Filling the #{container} with #{liquid}..."
ingredients = ["coffee", "milk", "syrup", "ice"]
result = (fill(elem) for elem in ingredients)
CoffeeScript
39. Compiled CoffeeScript
var elem, fill, ingredients, result;
fill = function(container, liquid) {
if (container == null) {
container = "cup";
}
if (liquid == null) {
liquid = "coffee";
}
return "Filling the " + container + " with " + liquid + "...";
};
ingredients = ["coffee", "milk", "sugar", "ice"];
result = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = ingredients.length; _i < _len; _i++) {
elem = ingredients[_i];
_results.push(fill(elem));
}
return _results;
})();