Explorar el Código

Moved theme entry point sorting fix to gulp–level in compileThemes.

Aleksander Nowodzinski hace 9 años
padre
commit
39343c4e99
Se han modificado 2 ficheros con 7 adiciones y 6 borrados
  1. 1 4
      dev/tasks/build/tasks.js
  2. 6 2
      dev/tasks/build/utils.js

+ 1 - 4
dev/tasks/build/tasks.js

@@ -118,10 +118,7 @@ module.exports = ( config ) => {
 			 * @returns {Stream}
 			 */
 			sass() {
-				// Note: Sort to make sure theme is the very first SASS to build. Otherwise,
-				// packages using mixins and variables from that theme will throw errors
-				// because such are not available at this stage of compilation.
-				const dirs = utils.getPackages( config.ROOT_DIR ).sort( a => -a.indexOf( 'ckeditor5-theme' ) );
+				const dirs = utils.getPackages( config.ROOT_DIR );
 
 				const streams = dirs.map( ( dirPath ) => {
 					const glob = path.join( dirPath, themesGlob );

+ 6 - 2
dev/tasks/build/utils.js

@@ -448,8 +448,12 @@ require( [ 'tests' ], bender.defer(), function( err ) {
 		function renderThemeFromEntryPoints( callback ) {
 			gutil.log( `Compiling '${ gutil.colors.cyan( fileName ) }' from ${ gutil.colors.cyan( paths.length ) } entry points...` );
 
-			// Note: Make sure windows\\style\\paths are preserved.
-			const dataToRender = paths.map( p => `@import "${ p.replace( /\\/g, '\\\\' ) }";` )
+			// Sort to make sure theme is the very first SASS to build. Otherwise,
+			// packages using mixins and variables from that theme will throw errors
+			// because such are not available at this stage of compilation.
+			const dataToRender = paths.sort( a => -a.indexOf( 'ckeditor5-theme' ) )
+				// Make sure windows\\style\\paths are preserved.
+				.map( p => `@import "${ p.replace( /\\/g, '\\\\' ) }";` )
 				.join( '\n' );
 
 			try {