]> source.dussan.org Git - jquery.git/commitdiff
Release: copy dist-module folder as well
authorTimmy Willison <timmywil@users.noreply.github.com>
Mon, 5 Feb 2024 17:56:33 +0000 (12:56 -0500)
committerGitHub <noreply@github.com>
Mon, 5 Feb 2024 17:56:33 +0000 (12:56 -0500)
Close gh-5407

build/release/dist.js

index e85ffd3591e6ed1afb98cc3a688b5c864aa15d4d..ad378468fba13052d8d2a2a33461af3271d77db2 100644 (file)
@@ -15,7 +15,11 @@ module.exports = function( Release, files, complete ) {
        const extras = [
                "src",
                "LICENSE.txt",
-               "AUTHORS.txt"
+               "AUTHORS.txt",
+               "dist/package.json",
+               "dist-module/package.json",
+               "dist-module/jquery.node-module-wrapper.js",
+               "dist-module/jquery.node-module-wrapper.slim.js"
        ];
 
        /**
@@ -65,9 +69,6 @@ module.exports = function( Release, files, complete ) {
         * Copy necessary files over to the dist repo
         */
        async function copy() {
-
-               // Copy dist files
-               const distFolder = `${ Release.dir.dist }/dist`;
                const readme = await fs.readFile(
                        `${ Release.dir.repo }/build/fixtures/README.md`, "utf8" );
                const rmIgnore = [ ...files, "node_modules" ]
@@ -86,14 +87,24 @@ module.exports = function( Release, files, complete ) {
                // Remove extraneous files before copy
                shell.rm( "-rf", `${ Release.dir.dist }/**/*` );
 
-               shell.mkdir( "-p", distFolder );
+               // Copy dist files
+               shell.mkdir( "-p", `${ Release.dir.dist }/dist` );
+               shell.mkdir( "-p", `${ Release.dir.dist }/dist-module` );
                files.forEach( function( file ) {
-                       shell.cp( "-f", `${ Release.dir.repo }/${ file }`, distFolder );
+                       shell.cp(
+                               "-f",
+                               `${ Release.dir.repo }/${ file }`,
+                               `${ Release.dir.dist }/${ file }`
+                       );
                } );
 
                // Copy other files
                extras.forEach( function( file ) {
-                       shell.cp( "-rf", `${ Release.dir.repo }/${ file }`, Release.dir.dist );
+                       shell.cp(
+                               "-rf",
+                               `${ Release.dir.repo }/${ file }`,
+                               `${ Release.dir.dist }/${ file }`
+                       );
                } );
 
                // Remove the wrapper & the ESLint config from the dist repo