Skip to content

Commit 6c90f30

Browse files
committed
feat: exclude yarn-error.log and .jshintrc, remove LICENSE outside of .app
1 parent 640fea0 commit 6c90f30

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"babel-plugin-transform-es2015-spread": "^6.8.0",
110110
"babel-plugin-transform-inline-imports-commonjs": "^1.2.0",
111111
"decompress-zip": "^0.3.0",
112-
"depcheck": "^0.6.5",
112+
"depcheck": "^0.6.6",
113113
"diff": "^3.1.0",
114114
"husky": "^0.11.9",
115115
"jest-cli": "^17.0.3",

src/packager/mac.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import BluebirdPromise from "bluebird-lst-c"
55
import { use, asArray } from "../util/util"
66
import { normalizeExt, PlatformPackager } from "../platformPackager"
77
import { warn } from "../util/log"
8+
import { unlinkIfExists } from "../util/fs"
89

910
function doRename (basePath: string, oldName: string, newName: string) {
1011
return rename(path.join(basePath, oldName), path.join(basePath, newName))
@@ -120,7 +121,9 @@ export async function createApp(packager: PlatformPackager<any>, appOutDir: stri
120121
writeFile(helperPlistFilename, buildPlist(helperPlist)),
121122
writeFile(helperEHPlistFilename, buildPlist(helperEHPlist)),
122123
writeFile(helperNPPlistFilename, buildPlist(helperNPPlist)),
123-
doRename(path.join(contentsPath, "MacOS"), "Electron", appPlist.CFBundleExecutable)
124+
doRename(path.join(contentsPath, "MacOS"), "Electron", appPlist.CFBundleExecutable),
125+
unlinkIfExists(path.join(appOutDir, "LICENSE")),
126+
unlinkIfExists(path.join(appOutDir, "LICENSES.chromium.html")),
124127
]
125128

126129
if (icon != null) {

src/platformPackager.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
193193

194194
if (debug.enabled) {
195195
const nodeModulesDir = path.join(appDir, "node_modules")
196-
debug(`Pruned dev or extraneous dependencies: ${Array.from(ignoreFiles).slice(2).map(it => path.relative(nodeModulesDir, it)).join(", ")}`)
196+
debug(`Dev or extraneous dependencies: ${Array.from(ignoreFiles).slice(2).map(it => path.relative(nodeModulesDir, it)).join(", ")}`)
197197
}
198198

199199
const patterns = this.getFileMatchers("files", appDir, path.join(resourcesPath, "app"), false, fileMatchOptions, platformSpecificBuildOptions)
@@ -208,10 +208,15 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
208208
defaultMatcher.addPattern("!**/node_modules/.bin")
209209
defaultMatcher.addPattern("!**/*.{o,hprof,orig,pyc,pyo,rbc,swp}")
210210
defaultMatcher.addPattern("!**/._*")
211-
defaultMatcher.addPattern("!.idea")
212211
defaultMatcher.addPattern("!*.iml")
213212
//noinspection SpellCheckingInspection
214-
defaultMatcher.addPattern("!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}")
213+
defaultMatcher.addPattern("!**/{.git,.hg,.svn,CVS,RCS,SCCS," +
214+
"__pycache__,.DS_Store,thumbs.db,.gitignore,.gitattributes," +
215+
".editorconfig,.flowconfig,.jshintrc," +
216+
".yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,npm-debug.log," +
217+
".idea," +
218+
"appveyor.yml,.travis.yml,circle.yml," +
219+
".nyc_output}")
215220

216221
let rawFilter: any = null
217222
const deprecatedIgnore = (<any>this.devMetadata.build).ignore

yarn.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,9 @@ delegates@^1.0.0:
10721072
version "1.0.0"
10731073
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
10741074

1075-
depcheck@^0.6.5:
1076-
version "0.6.5"
1077-
resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.6.5.tgz#baee2148e83f1295d372d7c50fd6f7205ccdb8fa"
1075+
depcheck@^0.6.6:
1076+
version "0.6.6"
1077+
resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.6.6.tgz#e01b8c5883c102c28b7df6127fe53c3d85ffb6e1"
10781078
dependencies:
10791079
babel-traverse "^6.7.3"
10801080
babylon "^6.1.21"
@@ -3536,8 +3536,8 @@ uc.micro@^1.0.1, uc.micro@^1.0.3:
35363536
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
35373537

35383538
uglify-js@^2.6:
3539-
version "2.7.4"
3540-
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2"
3539+
version "2.7.5"
3540+
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
35413541
dependencies:
35423542
async "~0.2.6"
35433543
source-map "~0.5.1"
@@ -3601,8 +3601,8 @@ uuid@^2.0.1:
36013601
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
36023602

36033603
uuid@^3.0.0:
3604-
version "3.0.0"
3605-
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.0.tgz#6728fc0459c450d796a99c31837569bdf672d728"
3604+
version "3.0.1"
3605+
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
36063606

36073607
validate-commit-msg@^2.8.2:
36083608
version "2.8.2"
@@ -3720,10 +3720,11 @@ worker-farm@^1.3.1:
37203720
xtend ">=4.0.0 <4.1.0-0"
37213721

37223722
wrap-ansi@^2.0.0:
3723-
version "2.0.0"
3724-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.0.0.tgz#7d30f8f873f9a5bbc3a64dabc8d177e071ae426f"
3723+
version "2.1.0"
3724+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
37253725
dependencies:
37263726
string-width "^1.0.1"
3727+
strip-ansi "^3.0.1"
37273728

37283729
wrappy@1:
37293730
version "1.0.2"

0 commit comments

Comments
 (0)