瀏覽代碼

Code refactoring: Clarified what's module and what's package.

Piotrek Koszuliński 10 年之前
父節點
當前提交
92683d4cf1
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 4 4
      dev/tasks/gulp/build.js
  2. 2 2
      dev/tasks/gulp/utils.js

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

@@ -51,7 +51,7 @@ module.exports = ( config ) => {
 			 * @returns {Stream}
 			 */
 			all( watch ) {
-				return merge( tasks.src.main( watch ), tasks.src.ckeditor5( watch ), tasks.src.modules( watch ) );
+				return merge( tasks.src.main( watch ), tasks.src.ckeditor5( watch ), tasks.src.packages( watch ) );
 			},
 
 			/**
@@ -78,7 +78,7 @@ module.exports = ( config ) => {
 
 				return gulp.src( glob )
 					.pipe( watch ? gulpWatch( glob ) : utils.noop() )
-					.pipe( utils.wrapCKEditor5Module() );
+					.pipe( utils.wrapCKEditor5Package() );
 			},
 
 			/**
@@ -87,7 +87,7 @@ module.exports = ( config ) => {
 			 * @param {Boolean} [watch] Whether to watch the files.
 			 * @returns {Stream}
 			 */
-			modules( watch ) {
+			packages( watch ) {
 				// Find all CKEditor5 package directories. Resolve symlinks so we watch real directories
 				// in order to workaround https://github.com/paulmillr/chokidar/issues/419.
 				const dirs = fs.readdirSync( path.join( config.ROOT_DIR, 'node_modules' ) )
@@ -124,7 +124,7 @@ module.exports = ( config ) => {
 				} );
 
 				return merge.apply( null, streams )
-					.pipe( utils.unpackModules() );
+					.pipe( utils.unpackPackages() );
 			}
 		},
 

+ 2 - 2
dev/tasks/gulp/utils.js

@@ -126,7 +126,7 @@ const utils = {
 	 *
 	 * @returns {Stream}
 	 */
-	unpackModules() {
+	unpackPackages() {
 		return rename( ( file ) => {
 			const dir = file.dirname.split( path.sep );
 
@@ -152,7 +152,7 @@ const utils = {
 	 *
 	 * @returns {Stream}
 	 */
-	wrapCKEditor5Module() {
+	wrapCKEditor5Package() {
 		return rename( ( file ) => {
 			file.dirname = path.join( file.dirname, 'ckeditor5' );
 		} );