瀏覽代碼

Merge branch 'master' into t/260

Piotrek Koszuliński 9 年之前
父節點
當前提交
6eaba630cb
共有 4 個文件被更改,包括 11 次插入138 次删除
  1. 3 3
      README.md
  2. 0 127
      dev/bender/plugins/ckeditor5/static/extensions.js
  3. 4 4
      gulpfile.js
  4. 4 4
      package.json

+ 3 - 3
README.md

@@ -4,13 +4,13 @@ CKEditor 5 – Development Repository
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5.svg)](https://david-dm.org/ckeditor/ckeditor5)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5#info=devDependencies)
 
-## Project Status (July 2016)
+## Project Status (August 2016)
 
-Version 0.1.0 was released on July 14, 2016. This is the first developer preview of the new CKEditor 5, and the first demo-able version.
+Version 0.2.0 was released on August 11, 2016. This is the second developer preview of the new CKEditor 5, and the second demo-able version.
 
 **It is not production ready** and will be followed by several releases before it reaches its first stable 1.0.0 version.
 
-Read more in the [CKEditor 5 v0.1.0 release blog post](http://ckeditor.com/blog/First-Developer-Preview-of-CKEditor-5-Available).
+Read more in the [CKEditor 5 v0.2.0 release blog post](http://ckeditor.com/blog/Second-Developer-Preview-of-CKEditor-5-Available).
 
 Check the basic CKEditor 5 sample on the [GitHub.io page](https://ckeditor5.github.io/).
 

+ 0 - 127
dev/bender/plugins/ckeditor5/static/extensions.js

@@ -21,39 +21,6 @@
 		return load( context, moduleId, url );
 	};
 
-	// Extend ChaiJS with custom exception check `expect().to.throwCKEditorError( [ msg ] )`.
-	require( [ '/ckeditor5/utils/ckeditorerror.js', 'chai' ], function( CKEditorError, chai ) {
-		CKEditorError = CKEditorError.default;
-
-		// Load extension and bind class used to check for inheritance.
-		chai.use( addThrowsCKEditorError.bind( null, CKEditorError ) );
-
-		// Self-test of the extension. Function names will help find those tests in case of regression.
-		chai.expect( function throwCKEditorErrorSelfTest1() {
-			throw new CKEditorError();
-		} ).to.throwCKEditorError();
-
-		chai.expect( function throwCKEditorErrorSelfTest2() {
-			throw new Error();
-		} ).to.not.throwCKEditorError();
-
-		chai.expect( function throwCKEditorErrorSelfTest3() {
-			throw new CKEditorError( 'custom message' );
-		} ).to.throwCKEditorError( 'message' );
-
-		chai.expect( function throwCKEditorErrorSelfTest4() {
-			throw new CKEditorError( 'another msg' );
-		} ).to.throwCKEditorError( /msg/ );
-
-		chai.expect( function throwCKEditorErrorSelfTest5() {
-			throw new CKEditorError( 'another msg' );
-		} ).to.throwCKEditorError( /^another/ );
-
-		chai.expect( function throwCKEditorErrorSelfTest6() {
-			throw new CKEditorError( 'another msg' );
-		} ).to.throwCKEditorError( /msg$/ );
-	} );
-
 	// Reported: https://github.com/benderjs/benderjs/issues/248
 	// Ugh... make some paths cleanup, because we need to combine these fragments and we don't want to
 	// duplicate '/'. BTW. if you want to touch this make sure you haven't broken Bender jobs which
@@ -79,98 +46,4 @@
 	function nonEmpty( str ) {
 		return !!str.length;
 	}
-
-	// Add `throwCKEditorError` chainable method to ChaiJS.
-	//
-	// @param {Object} CKEditorError Constructor of class checking for CKEditorError membership.
-	// @param {Object} _chai Chai instance.
-	// @param {Object} utils Chai extension utils.
-	// @returns {Object} Assertion
-	function addThrowsCKEditorError( CKEditorError, _chai, utils ) {
-		var Assertion = _chai.Assertion;
-
-		Assertion.addMethod( 'throwCKEditorError', assertThrowCKEditorError );
-
-		function assertThrowCKEditorError( errMsg ) {
-			// jshint validthis: true
-			// jscs:disable disallowMultipleVarDecl
-
-			var obj = utils.flag( this, 'object' ),
-				actuallyGot = '',
-				thrown = false,
-				thrownError = null,
-				message;
-
-			if ( arguments.length === 0 ) {
-				errMsg = null;
-			}
-
-			try {
-				obj();
-			} catch ( err ) {
-				this.assert(
-					CKEditorError.isCKEditorError( err ),
-					'expected #{this} to throw #{exp} but #{act} was thrown',
-					'expected #{this} to not throw #{exp} but #{act} was thrown',
-					'CKEditorError',
-					( err instanceof Error ? err.toString() : err )
-				);
-
-				// Set subject of assertion.
-				if ( !errMsg ) {
-					utils.flag( this, 'object', err );
-
-					return this;
-				}
-
-				// Check message of error.
-				message = utils.type( err ) === 'object' && 'message' in err ? err.message : err.toString();
-
-				if ( ( message !== null && message !== undefined ) && errMsg && errMsg instanceof RegExp ) {
-					this.assert(
-						errMsg.exec( message ),
-						'expected #{this} to throw CKEditorError matching #{exp} but got #{act}',
-						'expected #{this} to throw CKEditorError not matching #{exp}',
-						errMsg,
-						message
-					);
-
-					utils.flag( this, 'object', err );
-
-					return this;
-				} else if ( ( message !== null && message !== undefined ) && errMsg && typeof errMsg == 'string' ) {
-					this.assert(
-						message.indexOf( errMsg ) !== -1,
-						'expected #{this} to throw CKEditorError including #{exp} but got #{act}',
-						'expected #{this} to throw CKEditorError not including #{act}',
-						errMsg,
-						message
-					);
-
-					utils.flag( this, 'object', err );
-
-					return this;
-				} else {
-					thrown = true;
-					thrownError = err;
-				}
-			}
-
-			if ( thrown ) {
-				actuallyGot = ' but #{act} was thrown';
-			}
-
-			this.assert(
-				thrown === true,
-					'expected #{this} to throw an CKEditorError' + actuallyGot,
-					'expected #{this} to not throw an CKEditorError' + actuallyGot,
-					'CKEditorError',
-					( thrownError instanceof Error ? thrownError.toString() : thrownError )
-			);
-
-			utils.flag( this, 'object', thrownError );
-
-			return this;
-		}
-	}
 } )();

+ 4 - 4
gulpfile.js

@@ -39,7 +39,7 @@ const config = {
 
 // Lint tasks. ---------------------------------------------------------------
 
-const ckeditor5Lint = require( 'ckeditor5-dev-lint' )( config );
+const ckeditor5Lint = require( '@ckeditor/ckeditor5-dev-lint' )( config );
 
 gulp.task( 'lint', ckeditor5Lint.lint );
 gulp.task( 'lint-staged', ckeditor5Lint.lintStaged );
@@ -47,7 +47,7 @@ gulp.task( 'pre-commit', [ 'lint-staged' ] );
 
 // Development environment tasks. ---------------------------------------------
 
-const ckeditor5DevEnv = require( 'ckeditor5-dev-env' )( config );
+const ckeditor5DevEnv = require( '@ckeditor/ckeditor5-dev-env' )( config );
 
 gulp.task( 'init', ckeditor5DevEnv.initRepository );
 gulp.task( 'create-package', ckeditor5DevEnv.createPackage );
@@ -61,7 +61,7 @@ gulp.task( 'exec', ckeditor5DevEnv.execOnRepositories );
 
 // Compilation tasks. ---------------------------------------------------------
 
-const ckeditor5DevCompiler = require( 'ckeditor5-dev-compiler' )( config );
+const ckeditor5DevCompiler = require( '@ckeditor/ckeditor5-dev-compiler' )( config );
 const compiler = ckeditor5DevCompiler.compiler;
 
 gulp.task( 'default', [ 'compile' ] );
@@ -101,7 +101,7 @@ gulp.task( 'compile:themes:esnext', callback => {
 
 // Building tasks. ------------------------------------------------------------
 
-const ckeditor5DevBundle = require( 'ckeditor5-dev-bundler-rollup' )( config );
+const ckeditor5DevBundle = require( '@ckeditor/ckeditor5-dev-bundler-rollup' )( config );
 
 gulp.task( 'build', callback => {
 	runSequence(

+ 4 - 4
package.json

@@ -31,10 +31,10 @@
     "benderjs-mocha": "^0.3.0",
     "benderjs-promise": "^0.1.0",
     "benderjs-sinon": "^0.3.0",
-    "ckeditor5-dev-bundler-rollup": "ckeditor/ckeditor5-dev-bundler-rollup",
-    "ckeditor5-dev-compiler": "ckeditor/ckeditor5-dev-compiler",
-    "ckeditor5-dev-env": "ckeditor/ckeditor5-dev-env",
-    "ckeditor5-dev-lint": "ckeditor/ckeditor5-dev-lint",
+    "@ckeditor/ckeditor5-dev-bundler-rollup": "^1.0.1",
+    "@ckeditor/ckeditor5-dev-compiler": "^1.0.0",
+    "@ckeditor/ckeditor5-dev-env": "^1.0.0",
+    "@ckeditor/ckeditor5-dev-lint": "^1.0.1",
     "gulp": "^3.9.0",
     "guppy-pre-commit": "^0.3.0",
     "run-sequence": "^1.1.5"