├── public
│ ├── favicon.ico
│ └── style.css
├── view
│ └── index.html
This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.
The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.
npx create-react-app cra-ts --template typescript
// List all fonts on iPhone | |
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
for (NSString *family in familyNames) { | |
NSLog(@"Family name: %@", family); | |
fontNames = [UIFont fontNamesForFamilyName: family]; | |
for (NSString *font in fontNames) { | |
NSLog(@" Font name: %@", font); | |
} |
The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:
- How can authors of function-modules convert to ES6
export
syntax, without breaking consumers that dorequire("function-module")()
? - How can consumers of function-modules use ES6
import
syntax, while not demanding that the module author rewrites his code to ES6export
?
@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.
This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.
source :rubygems | |
gem 'sinatra' | |
gem 'httparty' | |
gem 'nokogiri' |