project-folder/
.git
wp-admin/
wp-content/
wp-includes/
.htaccess
/** | |
* | |
* 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#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin <branch-name> |