View .hyper.js
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: "stable", |
View pre-commit
#!/bin/bash | |
# flag to see if compiling is required | |
should_precompile=0 | |
wp_directory="wp-content/themes/securepay" | |
# check if there are changes | |
# wp-content/themes/securepay/css/* | |
if git diff-index --name-only HEAD | egrep "$wp_directory/css" >/dev/null ; then | |
should_precompile=1 |
View get-query-param.html
{# Helpers: getQueryParam #} | |
{# Returns the query value by handle #} | |
{# Parameters #} | |
{# url | URL | Required #} | |
{# parameter | Parameter name | Required #} | |
{# How to import this macro to my module #} | |
{# {% from 'NOW_002_Website/helpers/get-query-param.html' import getQueryParam %} #} |
View defer-css.js
// List of css file(s) to be deferred | |
var deferred_css = [ | |
"example-1.css", | |
"example-2.css", | |
]; | |
function insertCss(value, index) { | |
var link = document.createElement('link'); | |
link.rel = 'stylesheet'; | |
link.href = value; |
View slugify.html
{# Helpers: slugify #} | |
{# Returns the slug version of a string #} | |
{# Parameters #} | |
{# string | String to convert into a slug | Required #} | |
{# How to import this macro to my module #} | |
{# {% from '[folder]/slugify.html' import slugify %} #} | |
{# How to use this macro #} |