From 2a00eb632ab46c49582b977075816d0c37aeaa89 Mon Sep 17 00:00:00 2001 From: Igor Klopov Date: Sat, 4 Feb 2017 11:37:40 +0300 Subject: [PATCH] now-alpine + suppress a pkg warning (#277) * explicitly list pkg targets (alpine is not in default list) * suppress pkg warnings by adding 'may-exclude' --- lib/get-files.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/get-files.js b/lib/get-files.js index f797b6e..14b896f 100644 --- a/lib/get-files.js +++ b/lib/get-files.js @@ -39,7 +39,7 @@ async function npm(path, pkg, nowConfig = null, { // always include the "main" file if (pkg.main) { - search.push(require.resolve(resolve(path, pkg.main))) + search.push(require.resolve(resolve(path, pkg.main), 'may-exclude')) // pkg: may-exclude suppresses warnings } // compile list of ignored patterns and files diff --git a/package.json b/package.json index 12bb3fe..53ff15f 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "precommit": "npm run lint", "lint": "xo", "test": "npm run lint && ava", - "pack": "pkg . --out-dir packed" + "pack": "pkg . --out-dir packed -t node7-alpine-x64,node7-linux-x64,node7-macos-x64,node7-win-x64" }, "pkg": { "scripts": [