Ver código fonte

Minor fixes on style, typos, etc.

fredck 11 anos atrás
pai
commit
10246ac743
5 arquivos alterados com 18 adições e 20 exclusões
  1. 4 4
      LICENSE.md
  2. 1 3
      ckeditor.js
  3. 10 10
      dev/tasks/build/builder.js
  4. 2 2
      src/build/start.frag
  5. 1 1
      src/plugin.js

+ 4 - 4
LICENSE.md

@@ -6,11 +6,11 @@ Copyright (c) 2003-2014, [CKSource](http://cksource.com) Frederico Knabben. All
 
 Licensed under the terms of any of the following licenses at your choice:
 
- - [GNU General Public License Version 2 or later (the "GPL")](http://www.gnu.org/licenses/gpl.html)
+ * [GNU General Public License Version 2 or later (the "GPL")](http://www.gnu.org/licenses/gpl.html)
 
- - [GNU Lesser General Public License Version 2.1 or later (the "LGPL")](http://www.gnu.org/licenses/lgpl.html)
+ * [GNU Lesser General Public License Version 2.1 or later (the "LGPL")](http://www.gnu.org/licenses/lgpl.html)
 
- - [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html)
+ * [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html)
 
 You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using,
 reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of
@@ -28,7 +28,7 @@ with their express permission.
 
 Software available at our [repository](https://github.com/ckeditor/ckeditor5) and developer version only:
 
- - RequireJS (lib/requirejs) <br>
+ * RequireJS (lib/requirejs) <br>
    Licensed under the terms of the MIT or new BSD license. <br>
    Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
 

+ 1 - 3
ckeditor.js

@@ -26,7 +26,7 @@
 		 * It is possible to manually provide the base path by setting a global variable named `CKEDITOR_BASEPATH`. This
 		 * global variable must be set **before** the editor script loading.
 		 *
-		 *		alert( CKEDITOR.basePath ); // e.g. 'http://www.example.com/ckeditor/'
+		 *		console.log( CKEDITOR.basePath ); // e.g. 'http://www.example.com/ckeditor/'
 		 *
 		 * @property {String}
 		 */
@@ -85,9 +85,7 @@
 		}
 
 		var scripts = document.getElementsByTagName( 'script' );
-
 		var basePathSrcPattern = /(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i;
-
 		var path;
 
 		// Find the first script that src matches ckeditor.js.

+ 10 - 10
dev/tasks/build/builder.js

@@ -40,11 +40,11 @@ module.exports = Builder = function( target ) {
 	 * @type {Array}
 	 */
 	this.taskList = [
-		[ 'cleanup', 'Cleaning the "' + target + '" directory...' ],
+		[ 'cleanUp', 'Cleaning the "' + target + '" directory...' ],
 		[ 'copyToTmp', 'Copying source files for manipulation...' ],
 		[ 'removeAmdNamespace', 'AMD cleanup...' ],
 		[ 'optimize', 'Creating the optimized code...' ],
-		[ 'cleanupTmp', 'Removing the "' + this.tmp + '" directory...' ]
+		[ 'cleanUpTmp', 'Removing the "' + this.tmp + '" directory...' ]
 	];
 };
 
@@ -107,9 +107,9 @@ Builder.prototype = {
 		 * Deletes the `target` and `tmp` directories.
 		 *
 		 * @param {Function} callback Function to be called when the task is done.
-		 * @returns {Object} The callback returned valued.
+		 * @returns {Object} The callback returned value.
 		 */
-		cleanup: function( callback ) {
+		cleanUp: function( callback ) {
 			var del = require( 'del' );
 			del.sync( this.target );
 			del.sync( this.tmp );
@@ -121,7 +121,7 @@ Builder.prototype = {
 		 * Copy the local source code of CKEditor and its dependencies to the `tmp` directory for processing.
 		 *
 		 * @param {Function} callback Function to be called when the task is done.
-		 * @returns {Object} The callback returned valued.
+		 * @returns {Object} The callback returned value.
 		 */
 		copyToTmp: function( callback ) {
 			var ncp = require( 'ncp' ).ncp;
@@ -155,7 +155,7 @@ Builder.prototype = {
 					dereference: true
 				}, function( err ) {
 					if ( err ) {
-						throw( err );
+						throw err;
 					}
 
 					copy();
@@ -169,7 +169,7 @@ Builder.prototype = {
 		 * Removes the `CKEDITOR` namespace from AMD calls in the `tmp` copy of the source code.
 		 *
 		 * @param {Function} callback Function to be called when the task is done.
-		 * @returns {Object} The callback returned valued.
+		 * @returns {Object} The callback returned value.
 		 */
 		removeAmdNamespace: function( callback ) {
 			var replace = require( 'replace' );
@@ -190,7 +190,7 @@ Builder.prototype = {
 		 * source code.
 		 *
 		 * @param {Function} callback Function to be called when the task is done.
-		 * @returns {Object} The callback returned valued.
+		 * @returns {Object} The callback returned value.
 		 */
 		optimize: function( callback ) {
 			var requirejs = require( 'requirejs' );
@@ -224,9 +224,9 @@ Builder.prototype = {
 		 * Deletes `tmp` directory.
 		 *
 		 * @param {Function} callback Function to be called when the task is done.
-		 * @returns {Object} The callback returned valued.
+		 * @returns {Object} The callback returned value.
 		 */
-		cleanupTmp: function( callback ) {
+		cleanUpTmp: function( callback ) {
 			var del = require( 'del' );
 			del.sync( this.tmp );
 

+ 2 - 2
src/build/start.frag

@@ -12,7 +12,7 @@
 //  * CKEditor source code
 //  * end.frag
 
-( function ( root, factory ) {
+( function( root, factory ) {
 	// Register the CKEDITOR global.
 	root.CKEDITOR = factory();
 
@@ -22,6 +22,6 @@
 			return root.CKEDITOR;
 		} );
 	}
-} )( this, function () {
+} )( this, function() {
 
 /************************ start.frag END */

+ 1 - 1
src/plugin.js

@@ -21,7 +21,7 @@ define( 'plugin', [ 'plugin-core' ], function( CorePlugin ) {
 		var path = name.split( '/' );
 		path.splice( 1, 0, 'src' );
 
-		if ( path.length === 2 ) {
+		if ( path.length == 2 ) {
 			path.push( path[ 0 ] );
 		}