paragraph one
paragraph two
| import classNames from "classnames"; | |
| import Link, { LinkProps } from "next/link"; | |
| import { AnchorHTMLAttributes, ComponentProps } from "react"; | |
| import styles from "./Anchor.module.scss"; | |
| export default function Anchor({ | |
| children, | |
| className, | |
| ...linkProps |
paragraph one
paragraph two
| { | |
| "name": "dual-cjs-mjs-package", | |
| "version": "1.0.0", | |
| "description": "A package that can be both imported as esm and as cjs", | |
| "main": "entry", | |
| "scripts": { | |
| "build": "babel *.mjs **/*.mjs --out-dir ." | |
| }, | |
| "devDependencies": { | |
| "babel-cli": "^6.26.0", |
| # place this script in whatever directory you have your albums in | |
| # each album is expected to have an `original` sub-directory where the full-size images actually are | |
| # resized images will be placed in a sibling directory next to `original` | |
| # USAGE | |
| # $ ./resize.sh "2017-09-04 Some Album Name" 1600 | |
| # rename arguments | |
| ALBUM=$1 # the name of the directory containing the album (may contain spaces, which is why everything is quoted below) | |
| SIZE=$2 # used to size a bounding box into which images will be resized (aspect ratio will be preserved) |
| // node_modules/react-icons/lib/fa/500px.js | |
| 'use strict'; | |
| Object.defineProperty(exports, "__esModule", { | |
| value: true | |
| }); | |
| var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; |
| var slaying = true; | |
| // A bit of new math magic to calculate the odds | |
| // of hitting the dragon. We'll cover this soon! | |
| var youHit; | |
| var damageThisRound; | |
| var totalDamage = 0; | |
| do { | |
| youHit = Math.floor(Math.random() * 2); |
Mutations to the currently-initializing object will be allowed in Rip.
@ inside a class refers to the class' prototype property. Properties defined on this object become instance methods.@ inside a method refers to the method's receiver. (self refers to the method itself.)| require 'parslet' | |
| module Rip::Parser::Atoms | |
| class Pattern < Parslet::Atoms::Base | |
| attr_reader :pattern | |
| def initialize(pattern) | |
| super() | |
| @pattern = pattern | |
| end |
Instead of running $ node index.js to start the application, use $ node bootstrap.js. This will transform ES2015 module syntax into CommonJS module syntax on the fly.
See https://www.npmjs.com/package/es6-module-loader#nodejs-use
| System.List = class<T> { | |
| flatten = => { | |
| -> (list<System.List>) { | |
| switch (list.count) { | |
| case (0) { list } | |
| case (1) { [ self(list.head) ] } | |
| else { [ ...self(list.head), ...self(list.tail) ] } | |
| } | |
| } | |
| -> (object<System.Object>) { object } |