Serverless: Deprecation warning: Serverless Framework was enhanced with a new variables resolver which doesn't recognize "provider.variableSyntax" setting.Starting with a new major it will be the only resolver that's used.. Drop setting from a configuration to adapt to it More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
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 Analytics from 'analytics' | |
import onRouteChange from '@analytics/router-utils' | |
const persistPageViewsPlugin = { | |
name: 'persist-page-data-plugin', | |
page: ({ payload }) => { | |
const { properties } = payload | |
const pageView = { | |
path: properties.path, | |
title: properties.title, |
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
// via https://yeun.github.io/open-color/ | |
const palette = { | |
dark: [ | |
'#d5d7e0', | |
'#acaebf', | |
'#8c8fa3', | |
'#666980', | |
'#4d4f66', | |
'#34354a', |
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
{ | |
"if-not-ci": "pnpm ts support/scripts/run-if-not-ci.ts", | |
} |
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
function highlightMatch(string, regexp) { | |
return escapeString(string).replace(regexp, (match) => `<mark>${match}</mark>`) | |
} | |
// Used to match HTML entities and HTML characters. | |
const unescapedHtml = /[&<>"']/g | |
const hasUnescapedHtml = RegExp(unescapedHtml.source) | |
const htmlEscapes = { | |
'&': '&', |
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
/* Append arguments to functions */ | |
function appendArguments(fn, append, context) { | |
if (!append) return fn | |
// console.log('context', context) | |
return function () { | |
/* Original args */ | |
const args = Array.prototype.slice.call(arguments) | |
// console.log('original args', arguments) | |
/* Create clone of args */ |
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
{ | |
"scripts": { | |
"test": "npm-run-all 'test:* -- {1}'", | |
"test:unit": "ava --config ./_tests-unit.cjs", | |
"test:integration": "ava --config ./_tests-integration.cjs -- --email=$npm_config_email --pw=$npm_config_pw --stage=$npm_config_stage", | |
} | |
} |
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
{ | |
"scripts": { | |
"predownload": "rimraf ./tmp-folder && rimraf ./folder && mkdirp ./folder", | |
"download": "curl -H \"Authorization: token $GH_DOWNLOAD_TOKEN\" -L https://api.github.com/repos/repo/repoName/zipball/master > repo.zip", | |
"postdownload": "unzip -q -d ./tmp-folder repo.zip && cd tmp-folder && mv `ls` repo && mv `ls` ../folder && echo 'repo downloaded!'", | |
} | |
} |
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 regexMdLinks = /(?:['"(])((?:\/|https?:\/\/)[\w\d./?=#%+&]+)/gmi | |
// Example md file contents | |
var mdContents = ` | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit.. | |
[hello link](/admin/table_edit/table_edit.cfm?action=edit&table_name=organizationsXcategories) | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit.. |
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 fs = require('fs') | |
const path = require('path') | |
const matter = require('gray-matter') | |
const outdent = require('outdent') | |
const { promisify } = require('util') | |
const { globby } = require('markdown-magic') | |
const authorDirectory = path.join(__dirname, 'authors') | |
const postsDirectory = path.join(__dirname, 'posts') | |
const dateFormatRegex = /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])-/g |