Przeglądaj źródła

Fixed the bender config because it was not working if no build code was available.

fredck 11 lat temu
rodzic
commit
203dc852ae
1 zmienionych plików z 13 dodań i 9 usunięć
  1. 13 9
      bender.js

+ 13 - 9
bender.js

@@ -2,6 +2,9 @@
 
 'use strict';
 
+// Set it to true to test with the build version.
+var isBuild = false;
+
 var config = {
 	plugins: [
 		// Uncomment to enable code coverage.
@@ -22,20 +25,11 @@ var config = {
 				'node_modules/requirejs/require.js',
 				'ckeditor.js'
 			]
-		},
-
-		'ckeditor-build': {
-			path: 'build',
-			files: [
-				'ckeditor.js'
-			]
 		}
 	},
 
 	tests: {
 		all: {
-			// Swap the following "applications" lines to test the build version.
-			// applications: [ 'ckeditor-build' ],
 			applications: [ 'ckeditor' ],
 			paths: [
 				'tests/**',
@@ -54,4 +48,14 @@ var config = {
 	}
 };
 
+if ( isBuild ) {
+	// Change the 'ckeditor' application to point to the build.
+	config.applications[ 'ckeditor' ] = {
+		path: 'build',
+		files: [
+			'ckeditor.js'
+		]
+	};
+}
+
 module.exports = config;