Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove superfluous code comments #1150

Merged
merged 1 commit into from

5 participants

@necolas
Owner

Reduce the perceived complexity and verbosity of certain files by
stripping unneccessary inline comments.

Relevant documentation may end up in a doc/ directory such that any
download has an accurate and matching code documentation bundle.

Ref gh-1048

@necolas necolas Remove superfluous code comments
Reduce the perceived complexity and verbosity of certain files by
stripping unneccessary inline comments.

Relevant documentation may end up in a `doc/` directory such that any
download has an accurate and matching code documentation bundle.

Ref gh-1048
889e377
@drublic
Owner

This looks good from what I can see. It would be awesome to have the docs included in the repo so we can point to that in a comment (or better not :D). People will most likely see a folder in the repo more clearly than the wiki over here.

@necolas necolas merged commit 889e377 into master
@mklabs mklabs referenced this pull request in yeoman/yeoman
Closed

use strip-comments on h5bp download #46

@d8uv

This commit broke drop-in h5bp/ant-build-script

Owner

That's an issue for the ant-build-script and has been raised here before. This project isn't going to leave pieces of code lying around just in case someone wants to use a build script that requires them. Most people don't use the build scripts. If you use the build script, then adding some HTML comments is a fairly minor step in the process of configuring it.

I'm not disagreeing, I'd rather have a clean h5bp than one littered with comments. I just wanted to comment in case it was a slip. (I lost 15 minutes on finding out why the build script stopped working, so... when this deadline stops looming, I'll see if I can help out the docs)

Thank you!

Owner

No worries. If you want to help out, and the ant-build-script docs are not clear or up to date, please do feel free to improve that project's docs. It would be much appreciated! :)

h5bp/ant-build-script@be424f7 solved my only complaint with this commit, so thanks! I love you all <3

@irae

Some of this lines are very constructive and one of the strengths of H5BP. I agree with most of this commit, but this one in particular and some others should stay as it avoids people reopening issues and improve awareness on why some of this came to be in the project.

I constantly point people to H5BP to learn front-end best practices, but some of the removals may hide this value that the project currently has.

Owner

You can point them to the bundled docs instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 29, 2012
  1. @necolas

    Remove superfluous code comments

    necolas authored
    Reduce the perceived complexity and verbosity of certain files by
    stripping unneccessary inline comments.
    
    Relevant documentation may end up in a `doc/` directory such that any
    download has an accurate and matching code documentation bundle.
    
    Ref gh-1048
This page is out of date. Refresh to see the latest.
View
115 .htaccess
@@ -1,8 +1,8 @@
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
-# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
-# httpd.apache.org/docs/2.2/howto/htaccess.html
+# Note .htaccess files are an overhead, this logic should be in your Apache
+# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
@@ -10,13 +10,6 @@
# Sample .htaccess file of CMS MODx: modxcms.com
-###
-### If you run a webserver other than Apache, consider:
-### github.com/h5bp/server-configs
-###
-
-
-
# ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------
@@ -83,12 +76,10 @@
</IfModule>
-
# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------
-
# JavaScript
# Normalize to standard type (it's sniffed in IE anyways)
# tools.ietf.org/html/rfc4329#section-7.2
@@ -143,15 +134,14 @@ AddType text/vtt vtt
# and they would be included into this single file.
# This is not in use in the boilerplate as it stands. You may
-# choose to name your files in this way for this advantage or
-# concatenate and minify them manually.
-# Disabled by default.
+# choose to use this technique if you do not have a build process.
#<FilesMatch "\.combined\.js$">
# Options +Includes
# AddOutputFilterByType INCLUDES application/javascript application/json
# SetOutputFilter INCLUDES
#</FilesMatch>
+
#<FilesMatch "\.combined\.css$">
# Options +Includes
# AddOutputFilterByType INCLUDES text/css
@@ -217,8 +207,8 @@ AddType text/vtt vtt
# Additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
-# If you don't use filenames to version, lower the CSS and JS to something like
-# "access plus 1 week" or so.
+# If you don't use filenames to version, lower the CSS and JS to something like
+# "access plus 1 week".
<IfModule mod_expires.c>
ExpiresActive on
@@ -269,19 +259,20 @@ AddType text/vtt vtt
</IfModule>
+
# ----------------------------------------------------------------------
# Prevent mobile network providers from modifying your site
# ----------------------------------------------------------------------
-# The following header prevents modification of your code over 3G on some European providers
-# This is the official 'bypass' suggested by O2 in the UK
+# The following header prevents modification of your code over 3G on some
+# European providers.
+# This is the official 'bypass' suggested by O2 in the UK.
# <IfModule mod_headers.c>
# Header set Cache-Control "no-transform"
# </IfModule>
-
# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
@@ -297,14 +288,12 @@ AddType text/vtt vtt
FileETag None
-
# ----------------------------------------------------------------------
# Stop screen flicker in IE on CSS rollovers
# ----------------------------------------------------------------------
# The following directives stop screen flicker in IE on CSS rollovers - in
-# combination with the "ExpiresByType" rules for images (see above). If
-# needed, un-comment the following rules.
+# combination with the "ExpiresByType" rules for images (see above).
# BrowserMatch "MSIE" brokenvary=1
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
@@ -312,43 +301,41 @@ FileETag None
# SetEnvIf brokenvary 1 force-no-vary
-
# ----------------------------------------------------------------------
# Set Keep-Alive Header
# ----------------------------------------------------------------------
-# Keep-Alive allows the server to send multiple requests through one TCP-connection.
-# Be aware of possible disadvantages of this setting. Turn on if you serve a lot of
-# static content.
+# Keep-Alive allows the server to send multiple requests through one
+# TCP-connection. Be aware of possible disadvantages of this setting. Turn on
+# if you serve a lot of static content.
# <IfModule mod_headers.c>
# Header set Connection Keep-Alive
# </IfModule>
-
# ----------------------------------------------------------------------
# Cookie setting from iframes
# ----------------------------------------------------------------------
# Allow cookies to be set from iframes (for IE only)
-# If needed, uncomment and specify a path or regex in the Location directive
+# If needed, specify a path or regex in the Location directive.
# <IfModule mod_headers.c>
# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
# </IfModule>
-
# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------
-# Turning on the rewrite engine is necessary for the following rules and features.
-# FollowSymLinks must be enabled for this to work.
+# Turning on the rewrite engine is necessary for the following rules and
+# features. FollowSymLinks must be enabled for this to work.
#
-# Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN
-# If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where 'foo' is your directory.
+# Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN If
+# using the h5bp in a subdirectory, use `RewriteBase /foo` instead where 'foo'
+# is your directory.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
@@ -357,26 +344,27 @@ FileETag None
</IfModule>
-
# ----------------------------------------------------------------------
# Suppress or force the "www." at the beginning of URLs
# ----------------------------------------------------------------------
-# The same content should never be available under two different URLs - especially not with and
-# without "www." at the beginning, since this can cause SEO problems (duplicate content).
-# That's why you should choose one of the alternatives and redirect the other one.
+# The same content should never be available under two different URLs -
+# especially not with and without "www." at the beginning, since this can cause
+# SEO problems (duplicate content). That's why you should choose one of the
+# alternatives and redirect the other one.
-# By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
+# By default option 1 (no "www.") is activated.
# no-www.org/faq.php?q=class_b
-# If you rather want to use option 2, just comment out all option 1 lines
+# If you'd prefer to use option 2, just comment out all option 1 lines
# and uncomment option 2.
+
# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
# ----------------------------------------------------------------------
# Option 1:
-# Rewrite "www.example.com -> example.com"
+# Rewrite "www.example.com -> example.com".
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
@@ -387,9 +375,9 @@ FileETag None
# ----------------------------------------------------------------------
# Option 2:
-# To rewrite "example.com -> www.example.com" uncomment the following lines.
-# Be aware that the following rule might not be a good idea if you
-# use "real" subdomains for certain parts of your website.
+# Rewrite "example.com -> www.example.com".
+# Be aware that the following rule might not be a good idea if you use "real"
+# subdomains for certain parts of your website.
# <IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !=on
@@ -398,7 +386,6 @@ FileETag None
# </IfModule>
-
# ----------------------------------------------------------------------
# Built-in filename-based cache busting
# ----------------------------------------------------------------------
@@ -410,7 +397,6 @@ FileETag None
# To understand why this is important and a better idea than all.css?v1231,
# read: github.com/h5bp/html5-boilerplate/wiki/cachebusting
-# Uncomment to enable.
# <IfModule mod_rewrite.c>
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
@@ -418,14 +404,12 @@ FileETag None
# </IfModule>
-
# ----------------------------------------------------------------------
# Prevent SSL cert warnings
# ----------------------------------------------------------------------
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.example.com when your cert only allows https://secure.example.com
-# Uncomment the following lines to use this feature.
# <IfModule mod_rewrite.c>
# RewriteCond %{SERVER_PORT} !^443
@@ -433,18 +417,17 @@ FileETag None
# </IfModule>
-
# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------
-# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
-# e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
+# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the
+# same name does not exist.
+# webmasterworld.com/apache/3808792.htm
Options -MultiViews
-
# ----------------------------------------------------------------------
# Custom 404 page
# ----------------------------------------------------------------------
@@ -455,7 +438,6 @@ Options -MultiViews
ErrorDocument 404 /404.html
-
# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------
@@ -467,45 +449,40 @@ AddDefaultCharset utf-8
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
-
# ----------------------------------------------------------------------
# A little more security
# ----------------------------------------------------------------------
-
-# Do we want to advertise the exact version number of Apache we're running?
-# Probably not.
-## This can only be enabled if used in httpd.conf - It will not work in .htaccess
+# To avoid displaying the exact version number of Apache being used, add the
+# following to httpd.conf (it will not work in .htaccess):
# ServerTokens Prod
-
-# "-Indexes" will have Apache block users from browsing folders without a default document
-# Usually you should leave this activated, because you shouldn't allow everybody to surf through
-# every folder on your server (which includes rather private places like CMS system folders).
+# "-Indexes" will have Apache block users from browsing folders without a
+# default document Usually you should leave this activated, because you
+# shouldn't allow everybody to surf through every folder on your server (which
+# includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
-
-# Block access to "hidden" directories or files whose names begin with a period. This
-# includes directories used by version control systems such as Subversion or Git.
+# Block access to "hidden" directories or files whose names begin with a
+# period. This includes directories used by version control systems such as
+# Subversion or Git.
<IfModule mod_rewrite.c>
RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>
-
-# Block access to backup and source files
-# These files may be left by some text/html editors and
-# pose a great security danger, when anyone can access them
+# Block access to backup and source files. These files may be left by some
+# text/html editors and pose a great security danger, when anyone can access
+# them.
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
-
# If your server is not already configured as such, the following directive
# should be uncommented in order to set PHP's register_globals option to OFF.
# This closes a major security hole that is abused by most XSS (cross-site
View
17 crossdomain.xml
@@ -1,22 +1,15 @@
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
+ <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
-<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
-
-<!-- Most restrictive policy: -->
+ <!-- Most restrictive policy: -->
<site-control permitted-cross-domain-policies="none"/>
-<!-- Least restrictive policy: -->
-<!--
+ <!-- Least restrictive policy: -->
+ <!--
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
--->
-<!--
- If you host a crossdomain.xml file with allow-access-from domain="*"
- and don’t understand all of the points described here, you probably
- have a nasty security vulnerability. ~ simon willison
--->
-
+ -->
</cross-domain-policy>
View
32 css/main.css
@@ -6,12 +6,10 @@
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
- *
- * ==|== normalize ==========================================================
*/
-/* =============================================================================
+/* ==========================================================================
HTML5 display definitions
========================================================================== */
@@ -46,7 +44,7 @@ audio:not([controls]) {
}
-/* =============================================================================
+/* ==========================================================================
Base
========================================================================== */
@@ -93,7 +91,7 @@ body {
}
-/* =============================================================================
+/* ==========================================================================
Links
========================================================================== */
@@ -123,7 +121,7 @@ a:active {
}
-/* =============================================================================
+/* ==========================================================================
Typography
========================================================================== */
@@ -224,7 +222,7 @@ sub {
}
-/* =============================================================================
+/* ==========================================================================
Lists
========================================================================== */
@@ -247,7 +245,7 @@ nav ol {
}
-/* =============================================================================
+/* ==========================================================================
Embedded content
========================================================================== */
@@ -271,7 +269,7 @@ svg:not(:root) {
}
-/* =============================================================================
+/* ==========================================================================
Figures
========================================================================== */
@@ -280,7 +278,7 @@ figure {
}
-/* =============================================================================
+/* ==========================================================================
Forms
========================================================================== */
@@ -409,7 +407,7 @@ textarea {
}
-/* =============================================================================
+/* ==========================================================================
Tables
========================================================================== */
@@ -423,7 +421,7 @@ td {
}
-/* =============================================================================
+/* ==========================================================================
Chrome Frame Prompt
========================================================================== */
@@ -435,7 +433,8 @@ td {
}
-/* ==|== primary styles =====================================================
+/* ==========================================================================
+ Primary styles.
Author:
========================================================================== */
@@ -454,7 +453,7 @@ td {
-/* ==|== media queries ======================================================
+/* ==========================================================================
EXAMPLE Media Query for Responsive Design.
This example overrides the primary ('mobile first') styles
Modify as content requires.
@@ -466,7 +465,8 @@ td {
-/* ==|== non-semantic helper classes ========================================
+/* ==========================================================================
+ Helper classes.
Please define your styles before this section.
========================================================================== */
@@ -549,7 +549,7 @@ td {
-/* ==|== print styles =======================================================
+/* ==========================================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
View
29 humans.txt
@@ -1,6 +1,5 @@
+# humanstxt.org/
# The humans responsible & technology colophon
-# humanstxt.org
-
# TEAM
@@ -14,29 +13,3 @@
HTML5, CSS3
jQuery, Modernizr
-
-
-
- -o/-
- +oo//-
- :ooo+//:
- -ooooo///-
- /oooooo//:
- :ooooooo+//-
- -+oooooooo///-
- -://////////////+oooooooooo++////////////::
- :+ooooooooooooooooooooooooooooooooooooo+:::-
- -/+ooooooooooooooooooooooooooooooo+/::////:-
- -:+oooooooooooooooooooooooooooo/::///////:-
- --/+ooooooooooooooooooooo+::://////:-
- -:+ooooooooooooooooo+:://////:--
- /ooooooooooooooooo+//////:-
- -ooooooooooooooooooo////-
- /ooooooooo+oooooooooo//:
- :ooooooo+/::/+oooooooo+//-
- -oooooo/::///////+oooooo///-
- /ooo+::://////:---:/+oooo//:
- -o+/::///////:- -:/+o+//-
- :-:///////:- -:/://
- -////:- --//:
- -- -:
View
36 index.html
@@ -1,55 +1,33 @@
<!DOCTYPE html>
-<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
-<!-- Consider specifying the language of your content by adding the `lang` attribute to <html> -->
-<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
-<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
-<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
-
- <!-- Use the .htaccess and remove these lines to avoid edge case issues.
- More info: h5bp.com/i/378 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-
<title></title>
<meta name="description" content="">
-
- <!-- Mobile viewport optimized: h5bp.com/viewport -->
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
<link rel="stylesheet" href="css/main.css">
-
- <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
-
- <!-- All JavaScript at the bottom, except this Modernizr build.
- Modernizr enables HTML5 elements & feature detects for optimal performance.
- Create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="js/vendor/modernizr-2.6.1.min.js"></script>
</head>
<body>
- <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
- chromium.org/developers/how-tos/chrome-frame-getting-started -->
- <!--[if lt IE 7]><p class="chromeframe">Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
+ <!--[if lt IE 7]>
+ <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
+ <![endif]-->
<!-- Add your site or application content here -->
-
- <!-- JavaScript at the bottom for fast page loading: http://developer.yahoo.com/performance/rules.html#js_bottom -->
-
- <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.7.2.min.js"><\/script>')</script>
-
- <!-- scripts concatenated and minified via build script -->
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
- <!-- end scripts -->
- <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
- mathiasbynens.be/notes/async-analytics-snippet -->
+ <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
View
2  js/main.js
@@ -1,3 +1 @@
-/* Author:
-*/
View
4 js/plugins.js
@@ -1,4 +1,4 @@
-// Avoid `console` errors in browsers that lack a console
+// Avoid `console` errors in browsers that lack a console.
if (!(window.console && console.log)) {
(function() {
var noop = function() {};
@@ -11,4 +11,4 @@ if (!(window.console && console.log)) {
}());
}
-// place any jQuery/helper plugins in here, instead of separate, slower script files.
+// Place any jQuery/helper plugins in here.
View
3  robots.txt
@@ -1,4 +1,3 @@
-# www.robotstxt.org/
-# https://developers.google.com/webmasters/control-crawl-index/
+# robotstxt.org/
User-agent: *
Something went wrong with that request. Please try again.