Skip to content

Commit e27dd32

Browse files
author
Marco Solazzi
committed
Merge branch 'release/3.2.0'
2 parents fcf5b91 + 218f374 commit e27dd32

File tree

5 files changed

+62
-45
lines changed

5 files changed

+62
-45
lines changed

application/views/templates/_default.nunj.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,21 @@
1515
<meta name="HandheldFriendly" content="True" />
1616
<meta name="MobileOptimized" content="320" />
1717
<meta name="format-detection" content="telephone=no">
18-
<meta name="viewport" content="width=device-width, initial-scale=1" />
18+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
1919

20-
<!-- build:replace /assets/vendors/modernizr/modernizr.min.js -->
21-
<script src="/assets/vendors/modernizr/modernizr.js"></script>
20+
<!-- build:css /assets/stylesheets/application.min.css -->
21+
<link rel="stylesheet" href="/assets/stylesheets/application.css" />
2222
<!-- endbuild -->
2323

24+
<!--[if lt IE 9]>
25+
<script src="/assets/vendors/html5shiv/dist/html5shiv-printshiv.min.js"></script>
26+
<![endif]-->
2427

25-
<!-- build:css /assets/stylesheets/application.min.css -->
26-
<link rel="stylesheet" href="/assets/stylesheets/application.css" />
28+
<!-- build:replace /assets/vendors/modernizr/modernizr.min.js -->
29+
<script src="/assets/vendors/modernizr/modernizr.js"></script>
2730
<!-- endbuild -->
2831

32+
2933
{% block head %}
3034
{% endblock %}
3135

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wok",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"authors": [
55
"Marco Solazzi <[email protected]>",
66
"Matteo Guidotto <[email protected]>",

build/gulp-config/modernizr.conf.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
"atRule",
66
"domPrefixes",
77
"hasEvent",
8-
"html5shiv",
9-
"html5printshiv",
10-
"load",
118
"mq",
9+
"fnBind",
1210
"prefixed",
1311
"prefixes",
1412
"prefixedCSS",

build/gulp-tasks/modernizr.js

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
module.exports = function (gulp, $, options) {
77

8+
var defaultConfig = require('../gulp-config/modernizr.conf.json');
9+
810
var distConfig = {
911

1012
cache: true,
@@ -14,23 +16,7 @@ module.exports = function (gulp, $, options) {
1416
dest: options.paths.tmp + '/assets/vendors/modernizr/modernizr.js',
1517

1618
// Based on default settings on http://modernizr.com/download/
17-
options: [
18-
'setClasses',
19-
'addTest',
20-
'html5printshiv',
21-
'testProp',
22-
'fnBind',
23-
'atRule',
24-
'domPrefixes',
25-
'hasEvent',
26-
'html5shiv',
27-
'mq',
28-
'prefixed',
29-
'prefixes',
30-
'prefixedCSS',
31-
'testAllProps',
32-
'testStyles'
33-
],
19+
options: defaultConfig.options,
3420

3521
// By default, source is uglified before saving
3622
uglify: true,
@@ -67,7 +53,7 @@ module.exports = function (gulp, $, options) {
6753
};
6854

6955

70-
gulp.task('modernizr', function (done) {
56+
gulp.task('modernizr', ['modernizr:html5shiv'], function (done) {
7157
var fs = require('fs'),
7258
filePath = options.assetsPath('dist.vendors', '/modernizr'),
7359
fullConfig,
@@ -77,7 +63,25 @@ module.exports = function (gulp, $, options) {
7763

7864
if (options.production) {
7965
modernizr = require('customizr');
80-
modernizr(distConfig, function () {
66+
modernizr(distConfig, function (obj) {
67+
var tests = obj.options['feature-detects'],
68+
logStr = 'The production build includes the following tests: ',
69+
colors = $.util.colors;
70+
if (tests.length > 0) {
71+
72+
73+
logStr += colors.bold(tests.map(function (test) {
74+
return test.replace('test/', '');
75+
}).join(', '));
76+
77+
$.util.log(logStr);
78+
79+
$.util.log(
80+
'For optimal performances you might add a `defer` attribute to the script tag. ' +
81+
'Refer to https://github.com/Modernizr/Modernizr/issues/878#issuecomment-41448059 for guidelines'
82+
);
83+
}
84+
8185
done();
8286
});
8387
} else {
@@ -93,6 +97,15 @@ module.exports = function (gulp, $, options) {
9397

9498
});
9599

100+
gulp.task('modernizr:html5shiv', function () {
101+
102+
var path = require('path'),
103+
html5shivPath = path.join(path.dirname(require.resolve('html5shiv')), '*.min.js');
104+
105+
return gulp.src([html5shivPath])
106+
.pipe(gulp.dest(options.assetsPath('dist.vendors', 'html5shiv/dist')));
107+
});
108+
96109
};
97110

98111

package.json

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wok",
33
"description": "A Static Website Boilerplate",
4-
"version": "3.1.0",
4+
"version": "3.2.0",
55
"license": "MIT",
66
"repository": {
77
"type": "git",
@@ -25,54 +25,56 @@
2525
"engines": {
2626
"node": "~0.12.7"
2727
},
28-
"dependencies": {},
28+
"dependencies": {
29+
"html5shiv": "3.7.3"
30+
},
2931
"devDependencies": {
30-
"autoprefixer": "6.3.7",
31-
"browser-sync": "2.13.0",
32+
"autoprefixer": "6.4.0",
33+
"browser-sync": "2.14.0",
3234
"customizr": "https://github.com/doctyper/customizr/tarball/develop",
3335
"datauri": "1.0.4",
34-
"del": "2.2.1",
36+
"del": "2.2.2",
3537
"ftps": "0.4.7",
36-
"glob": "7.0.5",
38+
"glob": "7.0.6",
3739
"gulp": "3.9.1",
38-
"gulp-bump": "2.2.0",
39-
"gulp-changed": "1.3.0",
40+
"gulp-bump": "2.4.0",
41+
"gulp-changed": "1.3.2",
4042
"gulp-concat": "2.6.0",
4143
"gulp-filter": "4.0.0",
42-
"gulp-header": "1.8.7",
44+
"gulp-header": "1.8.8",
4345
"gulp-if": "2.0.1",
44-
"gulp-imagemin": "3.0.1",
46+
"gulp-imagemin": "3.0.3",
4547
"gulp-load-plugins": "1.2.4",
4648
"gulp-minify-css": "1.2.4",
4749
"gulp-notify": "2.2.0",
4850
"gulp-plumber": "1.1.0",
4951
"gulp-postcss": "6.1.1",
5052
"gulp-rename": "1.2.2",
51-
"gulp-rev": "7.1.0",
53+
"gulp-rev": "7.1.2",
5254
"gulp-rev-replace": "0.4.3",
5355
"gulp-sass": "2.3.2",
5456
"gulp-size": "2.1.0",
5557
"gulp-sourcemaps": "1.6.0",
56-
"gulp-uglify": "1.5.4",
58+
"gulp-uglify": "2.0.0",
5759
"gulp-useref": "3.1.0",
5860
"gulp-util": "3.0.7",
5961
"hasbin": "1.2.3",
6062
"image-size": "0.5.0",
61-
"inquirer": "1.1.1",
63+
"inquirer": "1.1.2",
6264
"lazypipe": "1.0.1",
63-
"lodash": "4.13.1",
65+
"lodash": "4.15.0",
6466
"lorem-ipsum": "1.0.3",
65-
"marked": "0.3.5",
67+
"marked": "0.3.6",
6668
"mkdirp": "0.5.1",
6769
"modernizr": "3.3.1",
6870
"node-sass": "3.8.0",
6971
"nunjucks": "2.4.2",
7072
"nunjucks-markdown": "2.0.0",
7173
"rsyncwrapper": "1.0.1",
7274
"run-sequence": "1.2.2",
73-
"semver": "5.2.0",
75+
"semver": "5.3.0",
7476
"ssh2": "0.5.0",
7577
"through2": "2.0.1",
76-
"yargs": "4.7.1"
78+
"yargs": "5.0.0"
7779
}
7880
}

0 commit comments

Comments
 (0)