]> source.dussan.org Git - jquery.git/commitdiff
Release: remove extraneous files from dist during release
authorTimmy Willison <timmywillisn@gmail.com>
Mon, 9 May 2016 17:53:03 +0000 (13:53 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Fri, 13 May 2016 15:39:51 +0000 (11:39 -0400)
Fixes gh-3094
Close gh-3116

build/release.js
build/release/dist.js

index 7fd00bd8c2cdf381af69c0367db916ff2ebedf25..f3ba4c8f3c69bb1b1a5d8709cb90d7dd763240b1 100644 (file)
@@ -55,6 +55,6 @@ module.exports = function( Release ) {
 
 module.exports.dependencies = [
        "archiver@0.14.2",
-       "shelljs@0.2.6",
+       "shelljs@0.7.0",
        "npm@2.3.0"
 ];
index 3ad00c59018403239d9c5888be8536c37fbc12fe..ffa6e1768b408666dfef3dcc49a23110013f6d35 100644 (file)
@@ -56,7 +56,20 @@ module.exports = function( Release, complete ) {
 
                // Copy dist files
                var distFolder = Release.dir.dist + "/dist",
-                       externalFolder = Release.dir.dist + "/external";
+                       externalFolder = Release.dir.dist + "/external",
+                       rmIgnore = [
+                               "README.md",
+                               "node_modules"
+                       ].map( function( file ) {
+                               return Release.dir.dist + "/" + file;
+                       } );
+
+               shell.config.globOptions = {
+                       ignore: rmIgnore
+               };
+
+               // Remove extraneous files before copy
+               shell.rm( "-rf", Release.dir.dist + "/**/*" );
 
                shell.mkdir( "-p", distFolder );
                [