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
import Cors from 'micro-cors' | |
import got from 'got' | |
import { format } from 'date-fns' | |
import { isEmpty, makeYaml } from 'utils' | |
const getContent = (message) => { | |
let { entities, text } = message | |
// Get url for the note | |
let urlEntity = entities.find((e) => e.type === 'url') |
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
window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; | |
/** | |
* Handles debouncing of events via requestAnimationFrame | |
* @see http://www.html5rocks.com/en/tutorials/speed/animations/ | |
* @param {Function} callback The callback to handle whichever event | |
*/ | |
function Debouncer (callback) { | |
this.callback = callback; | |
this.ticking = false; |
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
var gulp = require('gulp') | |
var minify = require('gulp-minify') | |
var minifyCSS = require('gulp-minify-css') | |
var watch = require('gulp-watch') | |
var server = require('gulp-server-livereload') | |
var remove = require('rimraf') | |
var exec = require('exec-chainable') | |
gulp.task('clean', function () { | |
return remove('./dist', function () { |