project-folder/
.git
wp-admin/
wp-content/
wp-includes/
.htaccess
// quite untested, adapted from BigstickCarpet's gist, attempt to make it simpler to use | |
function openIndexedDB (fileindex) { | |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
var openDB = indexedDB.open("MyDatabase", 1); | |
openDB.onupgradeneeded = function() { | |
var db = {} |
/** | |
* | |
* In this example we create view with inplace and bulk editing. | |
* Tools and plugins: | |
* jQuery | |
* xEditable jquery plugin | |
* twitter bootstrap | |
* | |
*/ |
<?php | |
if ( ! function_exists('config_path')) | |
{ | |
/** | |
* Get the configuration path. | |
* | |
* @param string $path | |
* @return string | |
*/ |
// add multiple items to the cart by passing an array of item objects | |
function addItems(items, callback) { | |
if(!items.length) { | |
// we ran out of items | |
if(typeof callback === 'function') callback(); | |
return; | |
} | |
$.ajax('/cart/add.js', { | |
type:'POST', |
// Dependencies | |
// - https://github.com/carolineschnapp/currencies | |
// Don't change currency if Cookie has been already set | |
if (Currency.cookie.read() == null) { | |
jQuery.ajax( { | |
url: '//freegeoip.net/json/', | |
type: 'GET', | |
dataType: 'jsonp', |
# Add Homestead Vagrant box | |
vagrant box add laravel/homestead | |
# Install PHP 5.6 and Composer | |
brew update | |
brew tap homebrew/dupes | |
brew tap homebrew/php | |
brew install php56 | |
brew install composer |
if (typeof Shopify === 'undefined') var Shopify = {}; | |
Shopify.cart = {{ cart | json }}; | |
Shopify.toAdd = 378589397; | |
var surchargeInCart = false; | |
var total = 2507; // total in cents. | |
for (var i=0; i<Shopify.cart.items.length; i++) { | |
if (Shopify.cart.items[i].id === Shopify.toAdd) { | |
surchargeInCart = true; | |
total -= Shopify.cart.items[i].line_price; |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used