TODO:
- Tools used
- Webpack
- CSS modules
- postcss + plugins used
- Why it's magic
- No namespace issues
- Composability
- Component-specific styles
TODO:
They're just variables you set on your system that various programs/processes can read. A fairly standard example in javascript circles would be setting your NODE_ENV variable to "production" or "development", altering how node code is executed on your system (for example showing more debug messaging when in development).
With most shells there's a way to set them for the current session, and a way to set them for all sessions. The following is meant to be a guide on how to set env vars in the various shells.
Setting for the session:
| export function AnimateMixinFactory(stateName) { | |
| var animateMixin = { | |
| getInitialState() { | |
| return { | |
| [stateName]: {} | |
| } | |
| } | |
| }; |
| gulp.task('hotreload', function() { | |
| require('./hotLoadServer'); | |
| }); |
| // 1. Load iamthefold.com on Google Chrome | |
| // 2. Open devtools (cmd-option-J on a mac) | |
| // 3. Paste the code below into the console | |
| copy(Array.prototype.slice.call(document.querySelectorAll('li')).map(function(elm){return elm.textContent})) | |
| // 4. Now paste into your favourite text editor! |
| 'use strict'; | |
| var React = require('react'); | |
| var BzIframe = React.createClass({ | |
| propTypes: { | |
| src: React.PropTypes.string.isRequired, | |
| onLoad: React.PropTypes.func | |
| }, |
| gulp.task('styleguide', ['build'], function() { | |
| var React = require('react'); | |
| require('node-jsx').install(); | |
| var p = require('path'); | |
| var components = {}; | |
| // This is the important bit | |
| var normalizedPath = p.join(__dirname, "src/components/"); | |
| require("fs").readdirSync(normalizedPath) |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' |
| /** | |
| * Changes effective as of v1.2-2014-g59824b3 | |
| * | |
| * Update Holistic's CMS MongoDB schema to reflect API changes. | |
| * | |
| * 1. Remove leading slashes from the `relativePath`s of all pages | |
| * 2. Replace template ObjectIDs stored on the page with the template file name. | |
| * 3. Drops the `simpleCmsTemplates` collection. | |
| * 4. Recursively add `absolutePath`s to all pages | |
| * |
| # Turn off greeting | |
| set fish_greeting "" | |
| # Aliases | |
| alias gs='git status' | |
| alias ga='git add' | |
| alias gc='git commit' | |
| alias gl='git log' | |
| alias gpr='git pull-request' | |
| alias cpwd='pwd | pbcopy' |