File and folder naming convention for React.js components
/actions/...
/components/common/Link.js
/components/common/...
/components/forms/TextBox.js
/components/forms/TextBox.res/style.css
After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.
I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.
When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:
#!/usr/bin/env node | |
var GCC_PREPROCESSOR_DEFINITIONS = '"$(inherited) DISABLE_PUSH_NOTIFICATIONS=1"'; | |
var fs = require("fs"); | |
var path = require("path"); | |
var xcode = require('xcode'); | |
var projectRoot = process.argv[2]; | |
function getProjectName(protoPath) { |
/* This file is only loaded on Cordova-bundled apps and is used only in case | |
* autoupdate package is used. | |
* It checks if File plugin is installed and a newer version of the app code can | |
* be found on persistent storage. In that case those files are dynamically | |
* added to the page. | |
* Otherwise a normal app code is loaded (shipped with the app initially). | |
*/ | |
// Store the potential used URL on cold-start | |
var invokeURL; |
export const GoogleApi = function(opts) { | |
opts = opts || {} | |
const apiKey = opts.apiKey; | |
const libraries = opts.libraries || []; | |
const client = opts.client; | |
const URL = 'https://maps.googleapis.com/maps/api/js'; | |
const googleVersion = '3.22'; | |
let script = null; |
<div style="font-family: sans-serif;"> | |
<? var data = valid(); ?> | |
<form id="form" name="form"> | |
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?> | |
<? for (var i = 0; i < data.length; i++) { ?> | |
<? for (var j = 0; j < data[i].length; j++) { ?> | |
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br> | |
<? } ?> | |
<? } ?> | |
<? } else { ?> |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys
and look for sec
, use the key ID for the next stepgit
to use GPG -- replace the key with the one from gpg --list-secret-keys
We are a data visualisation company based just off Old Street, London. We are looking for a JavaScript developer to join our start-up, and help us grow.
Our company is small (currently 5) with lots going on. You will be involved in many different projects, from working on our core platform, to creating data stories for our clients from scratch.
We use the latest technologies (D3, TypeScript, React, Redux, Node, PostgreSQL) to build innovative data visualisations to make information more engaging, accessible and most importantly useful in any type of organisation.
Our days vary, split between:
#!/bin/sh | |
if [ "${#}" -eq 0 ]; then | |
echo "Usage: $(basename "${0}") frame.io-URL" | |
exit 1 | |
fi | |
PAGE_URL=${1} | |
CURL_COMMAND=$(echo "${PAGE_URL}"|tr '/' ' '|awk '{ print "curl --silent -H x-review-link-id:" $4 " https://api.frame.io/v2/assets/" $5 }') | |
METADATA=$(${CURL_COMMAND}) |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.