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
$ npm install grunt | |
npm http GET https://registry.npmjs.org/grunt | |
npm http 304 https://registry.npmjs.org/grunt | |
npm http GET https://registry.npmjs.org/async | |
npm http GET https://registry.npmjs.org/coffee-script | |
npm http GET https://registry.npmjs.org/colors | |
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3 | |
npm http GET https://registry.npmjs.org/eventemitter2 | |
npm http GET https://registry.npmjs.org/findup-sync | |
npm http GET https://registry.npmjs.org/glob |
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
console.log("Some inline code"); | |
{ | |
"name": "my-theme", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "~0.4.2", | |
"grunt-contrib-compass": "~0.7.0", | |
"grunt-contrib-watch": "~0.5.3", | |
"grunt-contrib-imagemin": "~0.4.0", |
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
.idea/ | |
.project | |
*.sublime-project | |
*.sublime-workspace | |
*.tmproj | |
*.bak | |
*.swp | |
*~.nib | |
.sass-cache/ | |
node_modules/ |
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
(function($) { | |
$.fn.helloWorld = function() { | |
this.each( function() { | |
$(this).text("Hello, World!"); | |
}); | |
} | |
}(jQuery)); |
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
<html> | |
<head> | |
<!-- Inlined critical styles --> | |
<style>.blue{color:blue;}</style> | |
<!-- CSS loader --> | |
<script> | |
/* ========================================================================== | |
Load CSS asynchronously and conditionally after initial painting |
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
#!/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) |
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
#/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" | |
} |
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
<?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 |
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
#!/bin/bash | |
# Vars | |
java="java" | |
xsltproc="xsltproc" | |
node="node" | |
phantomjs="phantomjs" | |
grunt="grunt" | |
bower="bower" | |
compass="compass" |
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
#/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) |