Skip to content

Commit

Permalink
Merge branch 't/16801' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Comandeer committed Jan 20, 2017
2 parents 981d4a9 + 18c3a12 commit d69e345
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .jscsrc
Expand Up @@ -53,6 +53,6 @@
},
"validateIndentation": {
"value": "\t",
"allExcept": [ "comments" ]
"allExcept": [ "comments", "emptyLines" ]
}
}
}
2 changes: 1 addition & 1 deletion .jshintrc
Expand Up @@ -22,4 +22,4 @@
"validthis": true,

"predef": [ "CKEDITOR", "assert", "arrayAssert", "bender", "JSON", "objectAssert", "resume", "sinon", "wait", "YUITest" ]
}
}
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# CKEditor 4 - The best browser-based WYSIWYG editor

[![devDependency Status](https://david-dm.org/ckeditor/ckeditor-dev/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor-dev#info=devDependencies)
[![devDependencies Status](https://david-dm.org/ckeditor/ckeditor-dev/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor-dev?type=dev)

This repository contains the development version of CKEditor.

Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/jscs.js
Expand Up @@ -15,7 +15,7 @@ module.exports = function( grunt ) {
},

git: function() {
return tools.getGitDirtyFiles().filter( function( file ) {
return tools.getGitDirtyFiles( true ).filter( function( file ) {
return ( /\.js$/ ).test( file );
} );
}
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/jshint.js
Expand Up @@ -15,7 +15,7 @@ module.exports = function( grunt ) {
},

git: function() {
return tools.getGitDirtyFiles().filter( function( file ) {
return tools.getGitDirtyFiles( true ).filter( function( file ) {
return ( /\.js$/ ).test( file );
} );
}
Expand Down
16 changes: 7 additions & 9 deletions dev/tasks/utils/tools.js
Expand Up @@ -96,14 +96,15 @@ module.exports = {
/**
* Gets the list of files that are supposed to be included in the next Git commit.
*
* @param cachedOnly {Boolean} List only files which are staged.
* @returns {String[]} A list of file paths.
*/
getGitDirtyFiles: function() {
getGitDirtyFiles: function( cachedOnly ) {
// Cache it, so it is executed only once when running multiple tasks.
if ( !dirtyFiles ) {
dirtyFiles = this
// Compare the state of index with HEAD.
.shExec( 'git diff-index --name-only HEAD' )
.shExec( 'git diff-index --name-only ' + ( cachedOnly ? '--cached HEAD' : 'HEAD' ) )
// Remove trailing /n to avoid an empty entry.
.replace( /\s*$/, '' )
// Transform into array.
Expand All @@ -125,18 +126,15 @@ module.exports = {
* @returns {String} The command output.
*/
shExec: function( command ) {
var sh = require( 'shelljs' );
sh.config.silent = true;

var ret = sh.exec( command );
var sh = require( 'shelljs' ),
ret = sh.exec( command, { silent: true } );

if ( ret.code ) {
throw new Error(
'Error while executing `' + command + '`:\n\n' +
ret.output
ret.stdout
);
}

return ret.output;
return ret.stdout;
}
};
3 changes: 2 additions & 1 deletion gruntfile.js
Expand Up @@ -18,7 +18,8 @@ module.exports = function( grunt ) {
'samples/toolbarconfigurator/lib/**',
'tests/adapters/jquery/_assets/**',
'tests/core/dom/_assets/**',
'tests/core/selection/_helpers/rangy.js'
'tests/core/selection/_helpers/rangy.js',
'tests/plugins/pastefromword/generated/_lib/q.js'
];

// Basic configuration which will be overloaded by the tasks.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -9,17 +9,17 @@
"benderjs-sinon": "^0.3.1",
"benderjs-yui": "^0.3.2",
"benderjs-yui-beautified": "0.0.5",
"grunt": "^0",
"grunt": "^1.0.1",
"grunt-contrib-imagemin": "^1.0.0",
"grunt-jscs": "^2.0.0",
"grunt-jscs": "^3.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-less": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-contrib-concat": "^1.0.0",
"grunt-jsduck": "^1.0.1",
"grunt-githooks": "^0.5.0",
"grunt-githooks": "^0.6.0",
"less": "^2.5.0",
"shelljs": "~0.6",
"shelljs": "^0.7.6",
"cksource-samples-framework": "^1.0.1"
},
"scripts": {
Expand Down

0 comments on commit d69e345

Please sign in to comment.