diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2016-05-09 13:53:03 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2016-05-13 11:35:15 -0400 |
commit | 95c7ab68970ce201a2bbff48c8e951d38c228ce8 (patch) | |
tree | 025ae51dc17dca5ca948a8cded623087fe136939 /build | |
parent | 5086b3012d0f29de04b6823732b6f48250adda97 (diff) | |
download | jquery-95c7ab68970ce201a2bbff48c8e951d38c228ce8.tar.gz jquery-95c7ab68970ce201a2bbff48c8e951d38c228ce8.zip |
Release: remove extraneous files from dist during release
Fixes gh-3094
Close gh-3116
Diffstat (limited to 'build')
-rw-r--r-- | build/release.js | 2 | ||||
-rw-r--r-- | build/release/dist.js | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/build/release.js b/build/release.js index dd3745b35..72d6ab5a3 100644 --- a/build/release.js +++ b/build/release.js @@ -79,7 +79,7 @@ module.exports = function( Release ) { module.exports.dependencies = [ "archiver@0.14.2", - "shelljs@0.2.6", + "shelljs@0.7.0", "npm@2.3.0", "chalk@1.1.1" ]; diff --git a/build/release/dist.js b/build/release/dist.js index 84ce35d3c..da9ad2281 100644 --- a/build/release/dist.js +++ b/build/release/dist.js @@ -56,7 +56,22 @@ module.exports = function( Release, files, complete ) { // Copy dist files var distFolder = Release.dir.dist + "/dist", - externalFolder = Release.dir.dist + "/external"; + externalFolder = Release.dir.dist + "/external", + rmIgnore = files + .concat( [ + "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 ); files.forEach( function( file ) { |