mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-13 00:28:10 -05:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77c09009f6 | ||
|
|
4b089a3a76 | ||
|
|
340b012a1f | ||
|
|
438b8a7eef | ||
|
|
181c98ca75 | ||
|
|
97b04f4f4e | ||
|
|
7ac0465aa1 | ||
|
|
e8b9a8be39 | ||
|
|
3b215df3ec | ||
|
|
7df016247c | ||
|
|
fa840f07ef | ||
|
|
0c8b71eb88 | ||
|
|
1cf48987f5 | ||
|
|
a6a9094eba | ||
|
|
9fb12e846a | ||
|
|
50e4ffa3cf | ||
|
|
8dd98e8fc1 | ||
|
|
fc05bc82ab |
45
.travis.yml
45
.travis.yml
@@ -3,44 +3,12 @@
|
||||
# http://docs.travis-ci.com
|
||||
|
||||
after_success:
|
||||
|
||||
# Temporary workaround for:
|
||||
# https://github.com/travis-ci/travis-ci/issues/929
|
||||
|
||||
- python travis_after_all.py
|
||||
- export $(cat .to_export_back) &> /dev/null
|
||||
- |
|
||||
|
||||
# If all the tests pass in all the runtimes, make Travis
|
||||
# automatically download and execute the following script
|
||||
|
||||
if [ "$BUILD_LEADER" == "YES" ]; then
|
||||
if [ "$BUILD_AGGREGATE_STATUS" == "others_succeeded" ]; then \
|
||||
|
||||
# Clean up helper files
|
||||
rm -rf travis_after_all.py .to_export_back && \
|
||||
|
||||
# The `commit_build_changes.sh` script will run the build,
|
||||
# and if that generates changes, it will commit them to the
|
||||
# `master` branch:
|
||||
#
|
||||
# * ensuring that the content from the `dist/` directory
|
||||
# is always in sync with the rest of the content
|
||||
#
|
||||
# * removing the need to execute the build step locally
|
||||
# everytime a change is made (especially in the case
|
||||
# of trivial changes such as typos)
|
||||
#
|
||||
# Note: The `commit_build_changes.sh` script will only run
|
||||
# if the commit was made to the `master` branch.
|
||||
|
||||
curl -sSL "https://raw.githubusercontent.com/h5bp-bot/scripts/0.6.1/commit_build_changes.sh" |
|
||||
bash -s -- --branch "master" \
|
||||
--commands "npm install && npm run build" \
|
||||
--commit-message "Update content from the \`dist\` directory [skip ci]";
|
||||
|
||||
fi
|
||||
fi
|
||||
# Automatically update the content from the `dist/` directory
|
||||
$(npm bin)/commit-changes --branch "master" \
|
||||
--commands "npm run build" \
|
||||
--commit-message "Update content from the \`dist\` directory [skip ci]"
|
||||
|
||||
env:
|
||||
global:
|
||||
@@ -73,10 +41,7 @@ git:
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "iojs"
|
||||
- "0.12"
|
||||
|
||||
script:
|
||||
- curl -sSLo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
|
||||
- "4"
|
||||
|
||||
sudo: false
|
||||
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
||||
### 5.3.0 (January 12, 2016)
|
||||
|
||||
* Update jQuery to `v1.12.0`.
|
||||
* Fetch `jQuery` from jQuery's CDN instead of Google's
|
||||
([#1737](https://github.com/h5bp/html5-boilerplate/issues/1737),
|
||||
[#1739](https://github.com/h5bp/html5-boilerplate/issues/1739)).
|
||||
* Change print color for `:first-letter` and `:first-line`
|
||||
pseudo-elements
|
||||
([#1715](https://github.com/h5bp/html5-boilerplate/pull/1715)).
|
||||
|
||||
### 5.2.0 (May 1, 2015)
|
||||
|
||||
* Update jQuery to `v1.11.3`
|
||||
|
||||
@@ -54,6 +54,7 @@ Choose one of the following options:
|
||||
## Browser support
|
||||
|
||||
* Chrome *(latest 2)*
|
||||
* Edge *(latest 2)*
|
||||
* Firefox *(latest 2)*
|
||||
* Internet Explorer 8+
|
||||
* Opera *(latest 2)*
|
||||
|
||||
8
dist/css/main.css
vendored
8
dist/css/main.css
vendored
@@ -1,4 +1,4 @@
|
||||
/*! HTML5 Boilerplate v5.2.0 | MIT License | https://html5boilerplate.com/ */
|
||||
/*! HTML5 Boilerplate v5.3.0 | MIT License | https://html5boilerplate.com/ */
|
||||
|
||||
/*
|
||||
* What follows is the result of much research on cross-browser styling.
|
||||
@@ -116,7 +116,7 @@ textarea {
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers:
|
||||
* Hide visually and from screen readers
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
@@ -211,7 +211,9 @@ textarea {
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
*:after,
|
||||
*:first-letter,
|
||||
*:first-line {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster:
|
||||
http://www.sanbeiji.com/archives/953 */
|
||||
|
||||
16
dist/doc/faq.md
vendored
16
dist/doc/faq.md
vendored
@@ -3,8 +3,6 @@ table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
* [Why don't you automatically load the latest version of jQuery from the Google
|
||||
CDN?](#why-dont-you-automatically-load-the-latest-version-of-jquery-from-the-google-cdn)
|
||||
* [Why is the Google Analytics code at the bottom? Google recommends it be
|
||||
placed in the `<head>`.](#why-is-the-google-analytics-code-at-the-bottom-google-recommends-it-be-placed-in-the-head)
|
||||
* [How can I integrate Bootstrap with HTML5
|
||||
@@ -16,20 +14,6 @@ table of contents](TOC.md)
|
||||
|
||||
--
|
||||
|
||||
### Why don't you automatically load the latest version of jQuery from the Google CDN?
|
||||
|
||||
The [file](https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js) to which
|
||||
the Google [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) points
|
||||
to is [no longer updated and will stay locked at version `1.11.1` in order to
|
||||
prevent inadvertent web
|
||||
breakage](http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/).
|
||||
|
||||
In general, version updating should be an intentional decision! You shouldn't
|
||||
include a URL that will always point to the latest version, as that version:
|
||||
|
||||
* may not be compatible with the existing plugins/code on the site
|
||||
* will have a very short cache time compare to the specific version,
|
||||
which means that users won't get the benefits of long-term caching
|
||||
|
||||
### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.
|
||||
|
||||
|
||||
26
dist/doc/html.md
vendored
26
dist/doc/html.md
vendored
@@ -176,21 +176,26 @@ The main content area of the boilerplate includes a prompt to install an up to
|
||||
date browser for users of IE 6/7. If you intended to support IE 6/7, then you
|
||||
should remove the snippet of code.
|
||||
|
||||
### Google CDN for jQuery
|
||||
### jQuery CDN for jQuery
|
||||
|
||||
The Google CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page using a protocol-independent path (read more about this
|
||||
in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances
|
||||
The jQuery CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page. A local fallback of jQuery is included for rare instances
|
||||
when the CDN version might not be available, and to facilitate offline
|
||||
development.
|
||||
|
||||
The Google CDN version is chosen over other [potential candidates (like the
|
||||
jQuery CDN](https://jquery.com/download/#using-jquery-with-a-cdn)) because
|
||||
it's fast in absolute terms and it has the best overall
|
||||
[penetration](http://httparchive.org/trends.php#perGlibs) which increases the
|
||||
odds of having a copy of the library in your user's browser cache.
|
||||
The jQuery CDN version was chosen over other potential candidates
|
||||
([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/))
|
||||
because it's fast ([comparable or faster than Google by some
|
||||
measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90))
|
||||
and, (unlike Google's CDN) is available to China's hundreds of millions of internet users.
|
||||
For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191)
|
||||
the Google Hosted version over the jQuery CDN because it was available
|
||||
over HTTPS (the jQuery CDN was not,) and it offered a better chance of
|
||||
hitting the cache lottery owing to the popularity of the Google CDN.
|
||||
The first issue is no longer valid and the second is far outweighed by
|
||||
being able to serve jQuery to Chinese users.
|
||||
|
||||
While the Google CDN is a strong default solution your site or application may
|
||||
While the jQuery CDN is a strong default solution your site or application may
|
||||
require a different configuration. Testing your site with services like
|
||||
[WebPageTest](https://www.webpagetest.org/) and browser tools like
|
||||
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) or
|
||||
@@ -198,7 +203,6 @@ require a different configuration. Testing your site with services like
|
||||
world performance of your site and can show where you can optimize your specific
|
||||
site or application.
|
||||
|
||||
|
||||
### Google Universal Analytics Tracking Code
|
||||
|
||||
Finally, an optimized version of the Google Universal Analytics tracking code is
|
||||
|
||||
19
dist/doc/misc.md
vendored
19
dist/doc/misc.md
vendored
@@ -61,13 +61,14 @@ project](http://editorconfig.org/).
|
||||
|
||||
## Server Configuration
|
||||
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the Apache HTTP server. If you are not using
|
||||
Apache as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that corresponds
|
||||
to your web server and environment.
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the [Apache HTTP
|
||||
server](https://httpd.apache.org/docs/). If you are not using Apache
|
||||
as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that
|
||||
corresponds to your web server and environment.
|
||||
|
||||
A `.htaccess` (hypertext access) file is a
|
||||
[Apache HTTP server configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
A `.htaccess` (hypertext access) file is a [Apache HTTP server
|
||||
configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
The `.htaccess` file is mostly used for:
|
||||
|
||||
* Rewriting URLs
|
||||
@@ -104,8 +105,10 @@ In the repo the `.htaccess` is used for:
|
||||
When using `.htaccess` we recommend reading all inline comments (the rules after
|
||||
a `#`) in the file once. There is a bunch of optional stuff in it.
|
||||
|
||||
If you want to know more about the `.htaccess` file check out
|
||||
https://httpd.apache.org/docs/current/howto/htaccess.html.
|
||||
If you want to know more about the `.htaccess` file check out the
|
||||
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
|
||||
specifically the [htaccess
|
||||
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
|
||||
|
||||
Notice that the original repo for the `.htaccess` file is [this
|
||||
one](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
4
dist/index.html
vendored
4
dist/index.html
vendored
@@ -22,8 +22,8 @@
|
||||
<!-- Add your site or application content here -->
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
|
||||
6
dist/js/vendor/jquery-1.11.3.min.js
vendored
6
dist/js/vendor/jquery-1.11.3.min.js
vendored
File diff suppressed because one or more lines are too long
5
dist/js/vendor/jquery-1.12.0.min.js
vendored
Normal file
5
dist/js/vendor/jquery-1.12.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -47,7 +47,7 @@ gulp.task('archive:zip', function (done) {
|
||||
// permissions, so we need to add files individually
|
||||
archiver.append(fs.createReadStream(filePath), {
|
||||
'name': file,
|
||||
'mode': fs.statSync(filePath)
|
||||
'mode': fs.statSync(filePath).mode
|
||||
});
|
||||
|
||||
});
|
||||
@@ -61,7 +61,9 @@ gulp.task('clean', function (done) {
|
||||
require('del')([
|
||||
dirs.archive,
|
||||
dirs.dist
|
||||
], done);
|
||||
]).then(function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('copy', [
|
||||
|
||||
22
package.json
22
package.json
@@ -1,19 +1,21 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@alrra/travis-scripts": "^1.1.1",
|
||||
"apache-server-configs": "2.14.0",
|
||||
"archiver": "^0.14.3",
|
||||
"del": "^1.1.1",
|
||||
"glob": "^5.0.5",
|
||||
"archiver": "^0.21.0",
|
||||
"del": "^2.0.2",
|
||||
"glob": "^6.0.1",
|
||||
"gulp": "^3.8.11",
|
||||
"gulp-autoprefixer": "^2.1.0",
|
||||
"gulp-autoprefixer": "^3.0.2",
|
||||
"gulp-header": "^1.2.2",
|
||||
"gulp-jscs": "^1.5.1",
|
||||
"gulp-jshint": "^1.9.2",
|
||||
"gulp-load-plugins": "^0.10.0",
|
||||
"gulp-jscs": "^3.0.1",
|
||||
"gulp-jshint": "^2.0.0",
|
||||
"gulp-load-plugins": "^1.1.0",
|
||||
"gulp-rename": "^1.2.0",
|
||||
"gulp-replace": "^0.5.3",
|
||||
"jquery": "1.11.3",
|
||||
"jshint-stylish": "^1.0.1",
|
||||
"jquery": "1.12.0",
|
||||
"jshint": "^2.8.0",
|
||||
"jshint-stylish": "^2.0.1",
|
||||
"mocha": "^2.2.4",
|
||||
"normalize.css": "3.0.3",
|
||||
"run-sequence": "^1.0.2"
|
||||
@@ -40,5 +42,5 @@
|
||||
"build": "gulp build",
|
||||
"test": "gulp archive && mocha --reporter spec --timeout 5000"
|
||||
},
|
||||
"version": "5.2.0"
|
||||
"version": "5.3.0"
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ textarea {
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers:
|
||||
* Hide visually and from screen readers
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
@@ -203,7 +203,9 @@ textarea {
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
*:after,
|
||||
*:first-letter,
|
||||
*:first-line {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster:
|
||||
http://www.sanbeiji.com/archives/953 */
|
||||
|
||||
@@ -3,8 +3,6 @@ table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
* [Why don't you automatically load the latest version of jQuery from the Google
|
||||
CDN?](#why-dont-you-automatically-load-the-latest-version-of-jquery-from-the-google-cdn)
|
||||
* [Why is the Google Analytics code at the bottom? Google recommends it be
|
||||
placed in the `<head>`.](#why-is-the-google-analytics-code-at-the-bottom-google-recommends-it-be-placed-in-the-head)
|
||||
* [How can I integrate Bootstrap with HTML5
|
||||
@@ -16,20 +14,6 @@ table of contents](TOC.md)
|
||||
|
||||
--
|
||||
|
||||
### Why don't you automatically load the latest version of jQuery from the Google CDN?
|
||||
|
||||
The [file](https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js) to which
|
||||
the Google [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) points
|
||||
to is [no longer updated and will stay locked at version `1.11.1` in order to
|
||||
prevent inadvertent web
|
||||
breakage](http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/).
|
||||
|
||||
In general, version updating should be an intentional decision! You shouldn't
|
||||
include a URL that will always point to the latest version, as that version:
|
||||
|
||||
* may not be compatible with the existing plugins/code on the site
|
||||
* will have a very short cache time compare to the specific version,
|
||||
which means that users won't get the benefits of long-term caching
|
||||
|
||||
### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.
|
||||
|
||||
|
||||
@@ -176,21 +176,26 @@ The main content area of the boilerplate includes a prompt to install an up to
|
||||
date browser for users of IE 6/7. If you intended to support IE 6/7, then you
|
||||
should remove the snippet of code.
|
||||
|
||||
### Google CDN for jQuery
|
||||
### jQuery CDN for jQuery
|
||||
|
||||
The Google CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page using a protocol-independent path (read more about this
|
||||
in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances
|
||||
The jQuery CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page. A local fallback of jQuery is included for rare instances
|
||||
when the CDN version might not be available, and to facilitate offline
|
||||
development.
|
||||
|
||||
The Google CDN version is chosen over other [potential candidates (like the
|
||||
jQuery CDN](https://jquery.com/download/#using-jquery-with-a-cdn)) because
|
||||
it's fast in absolute terms and it has the best overall
|
||||
[penetration](http://httparchive.org/trends.php#perGlibs) which increases the
|
||||
odds of having a copy of the library in your user's browser cache.
|
||||
The jQuery CDN version was chosen over other potential candidates
|
||||
([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/))
|
||||
because it's fast ([comparable or faster than Google by some
|
||||
measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90))
|
||||
and, (unlike Google's CDN) is available to China's hundreds of millions of internet users.
|
||||
For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191)
|
||||
the Google Hosted version over the jQuery CDN because it was available
|
||||
over HTTPS (the jQuery CDN was not,) and it offered a better chance of
|
||||
hitting the cache lottery owing to the popularity of the Google CDN.
|
||||
The first issue is no longer valid and the second is far outweighed by
|
||||
being able to serve jQuery to Chinese users.
|
||||
|
||||
While the Google CDN is a strong default solution your site or application may
|
||||
While the jQuery CDN is a strong default solution your site or application may
|
||||
require a different configuration. Testing your site with services like
|
||||
[WebPageTest](https://www.webpagetest.org/) and browser tools like
|
||||
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) or
|
||||
@@ -198,7 +203,6 @@ require a different configuration. Testing your site with services like
|
||||
world performance of your site and can show where you can optimize your specific
|
||||
site or application.
|
||||
|
||||
|
||||
### Google Universal Analytics Tracking Code
|
||||
|
||||
Finally, an optimized version of the Google Universal Analytics tracking code is
|
||||
|
||||
@@ -61,13 +61,14 @@ project](http://editorconfig.org/).
|
||||
|
||||
## Server Configuration
|
||||
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the Apache HTTP server. If you are not using
|
||||
Apache as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that corresponds
|
||||
to your web server and environment.
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the [Apache HTTP
|
||||
server](https://httpd.apache.org/docs/). If you are not using Apache
|
||||
as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that
|
||||
corresponds to your web server and environment.
|
||||
|
||||
A `.htaccess` (hypertext access) file is a
|
||||
[Apache HTTP server configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
A `.htaccess` (hypertext access) file is a [Apache HTTP server
|
||||
configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
The `.htaccess` file is mostly used for:
|
||||
|
||||
* Rewriting URLs
|
||||
@@ -104,8 +105,10 @@ In the repo the `.htaccess` is used for:
|
||||
When using `.htaccess` we recommend reading all inline comments (the rules after
|
||||
a `#`) in the file once. There is a bunch of optional stuff in it.
|
||||
|
||||
If you want to know more about the `.htaccess` file check out
|
||||
https://httpd.apache.org/docs/current/howto/htaccess.html.
|
||||
If you want to know more about the `.htaccess` file check out the
|
||||
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
|
||||
specifically the [htaccess
|
||||
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
|
||||
|
||||
Notice that the original repo for the `.htaccess` file is [this
|
||||
one](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Add your site or application content here -->
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/{{JQUERY_VERSION}}/jquery.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-{{JQUERY_VERSION}}.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-{{JQUERY_VERSION}}.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
@@ -58,7 +58,7 @@ function runTests() {
|
||||
});
|
||||
|
||||
it('"index.html" should contain the correct jQuery version in the CDN URL', function (done) {
|
||||
var string = 'ajax.googleapis.com/ajax/libs/jquery/' + pkg.devDependencies.jquery + '/jquery.min.js';
|
||||
var string = 'code.jquery.com/jquery-' + pkg.devDependencies.jquery + '.min.js';
|
||||
checkString(path.resolve(dir, 'index.html'), string, done);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user