Merge pull request #4982 from google/sgomes-update-deps-2016-12

Update dependencies
This commit is contained in:
Sérgio Gomes 2016-12-15 16:26:40 +00:00 committed by GitHub
commit 2e98c1dca2
5 changed files with 49 additions and 119 deletions

View File

@ -1,6 +1,5 @@
{
"preset": "google",
"esnext": true,
"disallowSpacesInAnonymousFunctionExpression": null,
"validateLineBreaks": "LF",
"validateIndentation": 2,
@ -8,9 +7,7 @@
"maximumLineLength": 130,
"validateQuoteMarks": "'",
"requireDotNotation": false,
"requireCamelCaseOrUpperCaseIdentifiers": null,
"additionalRules": ["./utils/jscs-rules/*.js", "../utils/jscs-rules/*.js"],
"closureCamelCase": true,
"requireCamelCaseOrUpperCaseIdentifiers": {"allowedPrefixes": ["opt_"]},
"jsDoc": {
"checkAnnotations": {
"preset": "closurecompiler",

View File

@ -17,7 +17,7 @@
*
*/
// jscs:disable jsDoc
// jscs:disable jsDoc
'use strict';
@ -219,12 +219,12 @@ gulp.task('closure', () => {
compilerPath: 'node_modules/google-closure-compiler/compiler.jar',
fileName: 'material.closure.min.js',
compilerFlags: {
// jscs:disable closureCamelCase
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
compilation_level: 'ADVANCED_OPTIMIZATIONS',
language_in: 'ECMASCRIPT6_STRICT',
language_out: 'ECMASCRIPT5_STRICT',
warning_level: 'VERBOSE'
// jscs:enable closureCamelCase
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
}
}))
.pipe(gulp.dest('./dist'));

View File

@ -15,34 +15,34 @@
"chai": "^3.3.0",
"chai-jquery": "^2.0.0",
"del": "^2.0.2",
"drool": "^0.3.1",
"drool": "^0.4.0",
"escodegen": "^1.6.1",
"google-closure-compiler": "",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.0.2",
"gulp-cache": "^0.3.0",
"gulp-closure-compiler": "^0.3.1",
"gulp-cache": "^0.4.5",
"gulp-closure-compiler": "^0.4.0",
"gulp-concat": "^2.4.1",
"gulp-connect": "^5.0.0",
"gulp-css-inline-images": "^0.1.1",
"gulp-csso": "1.0.0",
"gulp-file": "^0.2.0",
"gulp-file": "^0.3.0",
"gulp-flatten": "^0.3.1",
"gulp-front-matter": "^1.2.2",
"gulp-header": "^1.2.2",
"gulp-if": "^2.0.0",
"gulp-iife": "^0.1.0",
"gulp-iife": "^0.3.0",
"gulp-imagemin": "^3.1.0",
"gulp-jscs": "^3.0.1",
"gulp-jshint": "^1.6.3",
"gulp-jscs": "^4.0.0",
"gulp-jshint": "^2.0.4",
"gulp-load-plugins": "^1.3.0",
"gulp-marked": "^1.0.0",
"gulp-mocha-phantomjs": "^0.12.0",
"gulp-open": "^1.0.0",
"gulp-open": "^2.0.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.3",
"gulp-sass": "3.0.0",
"gulp-shell": "^0.4.2",
"gulp-shell": "^0.5.2",
"gulp-size": "^2.0.0",
"gulp-sourcemaps": "^2.0.1",
"gulp-subtree": "^0.1.0",
@ -52,7 +52,8 @@
"gulp-zip": "^3.0.2",
"humanize": "0.0.9",
"jquery": "^3.1.1",
"jshint-stylish": "^2.0.1",
"jshint": "^2.9.4",
"jshint-stylish": "^2.2.1",
"merge-stream": "^1.0.0",
"mocha": "^3.0.2",
"prismjs": "0.0.1",

View File

@ -9,42 +9,42 @@
// MIT license
(function() {
'use strict';
'use strict';
if (!Date.now) {
/**
* Date.now polyfill.
* @return {number} the current Date
*/
Date.now = function() { return new Date().getTime(); };
Date['now'] = Date.now;
}
if (!Date.now) {
/**
* Date.now polyfill.
* @return {number} the current Date
*/
Date.now = function() { return new Date().getTime(); };
Date['now'] = Date.now;
}
var vendors = ['webkit', 'moz'];
for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
var vp = vendors[i];
window.requestAnimationFrame = window[vp + 'RequestAnimationFrame'];
window.cancelAnimationFrame = (window[vp + 'CancelAnimationFrame'] ||
window[vp + 'CancelRequestAnimationFrame']);
window['requestAnimationFrame'] = window.requestAnimationFrame;
window['cancelAnimationFrame'] = window.cancelAnimationFrame;
}
var vendors = ['webkit', 'moz'];
for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
var vp = vendors[i];
window.requestAnimationFrame = window[vp + 'RequestAnimationFrame'];
window.cancelAnimationFrame = (window[vp + 'CancelAnimationFrame'] ||
window[vp + 'CancelRequestAnimationFrame']);
window['requestAnimationFrame'] = window.requestAnimationFrame;
window['cancelAnimationFrame'] = window.cancelAnimationFrame;
}
if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
var lastTime = 0;
/**
* requestAnimationFrame polyfill.
* @param {!Function} callback the callback function.
*/
window.requestAnimationFrame = function(callback) {
var now = Date.now();
var nextTime = Math.max(lastTime + 16, now);
return setTimeout(function() { callback(lastTime = nextTime); },
nextTime - now);
};
window.cancelAnimationFrame = clearTimeout;
window['requestAnimationFrame'] = window.requestAnimationFrame;
window['cancelAnimationFrame'] = window.cancelAnimationFrame;
}
if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
var lastTime = 0;
/**
* requestAnimationFrame polyfill.
* @param {!Function} callback the callback function.
*/
window.requestAnimationFrame = function(callback) {
var now = Date.now();
var nextTime = Math.max(lastTime + 16, now);
return setTimeout(function() { callback(lastTime = nextTime); },
nextTime - now);
};
window.cancelAnimationFrame = clearTimeout;
window['requestAnimationFrame'] = window.requestAnimationFrame;
window['cancelAnimationFrame'] = window.cancelAnimationFrame;
}
})();

View File

@ -1,68 +0,0 @@
/**
* @license
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Checks that identifiers are written in camelCase (or UPPER_CASE), with the
* exception of optional parameters (opt_foo), which follow Closure convention.
*/
'use strict';
module.exports = function() {};
/**
* Returns the option name to JSCS.
* @return {string} the option name.
*/
module.exports.prototype.getOptionName = function() {
return 'closureCamelCase';
};
/**
* Configure the rule parameters.
* @param {boolean} value the value for this rule.
*/
module.exports.prototype.configure = function(value) {
// rule preparation and configuration
this._options = value;
};
/**
* Checks whether or not the rule is being broken.
* @param {Object} file the file being checked
* @param {Object} errors the current list of errors on the file
*/
module.exports.prototype.check = function(file, errors) {
if (!this._options) {
return;
}
file.iterateTokensByType('Identifier', function(token) {
var name = token.value;
if (name.replace(/^_+/g, '')
.replace(/^opt_+/g, '')
.replace(/_+$/g, '')
.indexOf('_') === -1 ||
name.toUpperCase() === name) {
return;
}
errors.add(
'All identifiers must be camelCase or UPPER_CASE',
token.loc.start.line,
token.loc.start.column
);
});
};