Browse Source

Now respecting the `files` property inside `now.json` (#692)

* whitelist now.json files over .gitignores (fixes #596)

* Prettified
master
Josh Junon 8 years ago
committed by Leo Lamprecht
parent
commit
17b7a5464d
  1. 6
      lib/get-files.js

6
lib/get-files.js

@ -161,7 +161,7 @@ async function npm(
nowConfig = {},
{ limit = null, hasNowJson = false, debug = false } = {}
) {
const whitelist = nowConfig.files || pkg.files
const whitelist = nowConfig.files || pkg.files || (pkg.now && pkg.now.files)
// The package.json `files` whitelist still
// honors ignores: https://docs.npmjs.com/files/package.json#files
@ -193,7 +193,9 @@ async function npm(
// but we don't ignore if the user is explicitly listing files
// under the now namespace, or using files in combination with gitignore
const overrideIgnores =
(pkg.now && pkg.now.files) || (gitIgnore !== null && pkg.files)
(pkg.now && pkg.now.files) ||
nowConfig.files ||
(gitIgnore !== null && pkg.files)
const accepts = overrideIgnores
? () => true
: file => {

Loading…
Cancel
Save