View sample
<p>Hello World!</p> |
View .htaccess
# | |
# Whitelist appropriate assets files. | |
# Note that you will need to maintain this whitelist yourself if you modify File::$allowed_extensions | |
# | |
# If you are not using Apache then you can ignore this file. | |
# If you are using IIS then you should look at assets/web.config instead. | |
# | |
# To add an extension to the list, you need to put another string of the form "ext|" on the | |
# FilesMatch line, inside the parentheses. | |
# |
View pre-commit
#/usr/bin/env bash | |
# git hook to run a command before `git commit` | |
# Run the build process `grunt` | |
echo "--- Verify frontend build passes before we commit..." | |
echo "--- If the build fails fix the issue and try committing again" | |
(cd theme; grunt) |
View frontend-tools.sh
#!/bin/bash | |
# Vars | |
java="java" | |
xsltproc="xsltproc" | |
node="node" | |
phantomjs="phantomjs" | |
grunt="grunt" | |
bower="bower" | |
compass="compass" |
View wp-config.php
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
View post-merge
#/usr/bin/env bash | |
# git hook to run a command after `git merge` or `git pull` | |
# Check for changed files | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} |
View frontend-setup.sh
#!/bin/bash | |
# Assumes the following project structure: | |
# | |
# myproject/site/.git | |
# myproject/site/.githooks | |
# myproject/site/.githooks/pre-commit | |
# myproject/site/.githooks/post-merge | |
# myproject/site/.shell | |
# myproject/site/.shell/frontend-setup.sh (this file) |
View async-and-conditional-css-loading.html
<html> | |
<head> | |
<!-- Inlined critical styles --> | |
<style>.blue{color:blue;}</style> | |
<!-- CSS loader --> | |
<script> | |
/* ========================================================================== | |
Load CSS asynchronously and conditionally after initial painting |
View hello-world.js
(function($) { | |
$.fn.helloWorld = function() { | |
this.each( function() { | |
$(this).text("Hello, World!"); | |
}); | |
} | |
}(jQuery)); |
View .gitignore
.idea/ | |
.project | |
*.sublime-project | |
*.sublime-workspace | |
*.tmproj | |
*.bak | |
*.swp | |
*~.nib | |
.sass-cache/ | |
node_modules/ |