import { prefetchSection, loadSection } from "./section-rendering";
// hover / mouseover
function variantHover(newVariantId: number) {
prefetchSection("product-form", `/products/current-product`, newVariantId);
}
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 { searchTree } from '../searchTree'; | |
const validTree = [ | |
{ | |
id: 1, | |
parent_id: 0, | |
title: 'Level 1', | |
value: 1, | |
children: [ | |
{ |
Fauna doesn't (yet?) provide guaranteed expiration/TTL for ABAC tokens, so we need to implement it ourselves if we care about it.
3 javascript functions, each of which can be imported into your project or run from the command-line
using node path/to/script.js arg1 arg2 ... argN
:
deploy-schema.js
: a javascript function for creating supporting collections and indexes in your Fauna database.
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 hoverTime = 400 | |
const fetchers = {} | |
const doc = document.implementation.createHTMLDocument('prefetch') | |
function fetchPage (url, success) { | |
const xhr = new XMLHttpRequest() | |
xhr.open('GET', url) | |
xhr.setRequestHeader('VND.PREFETCH', 'true') | |
xhr.setRequestHeader('Accept', 'text/html') | |
xhr.onreadystatechange = () => { |
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
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
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
let gulp = require('gulp') | |
let rev = require('gulp-rev') | |
let concat = require('gulp-concat') | |
let rename = require('gulp-rename') | |
let replace = require('gulp-replace') | |
let clean = require('gulp-clean') | |
let uglify = require('gulp-uglify') | |
let autoprefixer = require('gulp-autoprefixer') | |
let cssnano = require('gulp-cssnano') | |
let htmlmin = require('gulp-htmlmin') |
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 step_number = 0; | |
switch (Shopify.Checkout.step) { | |
case "contact_information": | |
step_number = 1; | |
break; | |
case "shipping_method": | |
step_number = 2; | |
break; |
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
'use strict'; | |
const browserSync = require( 'browser-sync' ).create(); | |
const gulp = require( 'gulp' ); | |
const gulpif = require( 'gulp-if' ); | |
const rename = require( 'gulp-rename' ); | |
const uglify = require( 'gulp-uglify' ); | |
const rollup = require( 'rollup' ); | |
const rollupStream = require( 'rollup-stream' ); |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Mutation Listener</title> | |
<script src="mutationlistener.js"></script> | |
</head> | |
<body> | |
<div id="test"> | |
Existing content | |
</div> |
NewerOlder