This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const markdownIt = require('markdown-it') | |
const frontMatter = require('front-matter') | |
const Prism = require('prismjs') | |
const aliases = { | |
'js': 'jsx', | |
'html': 'markup' | |
} | |
const highlight = (str, lang) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
npmname=$1 | |
destination=/usr/src/npm/$npmname | |
if test -d $destination; then | |
echo "$npmname is already cloned into:" | |
echo " $destination" | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const minute = 60; | |
const hour = minute * 60; | |
const day = hour * 24; | |
const week = day * 7; | |
const month = day * 30; | |
const year = day * 365; | |
/** | |
* Convert a date to a relative time string, such as | |
* "a minute ago", "in 2 hours", "yesterday", "3 months ago", etc. |
OlderNewer