Optional .npmrc to support private NPM registry

This commit is contained in:
Fabian Chong
2020-11-26 18:28:50 +08:00
committed by Joel Low
parent 05f3ca491e
commit fe5c6a7727
3 changed files with 7 additions and 2 deletions
@@ -34,11 +34,15 @@ export default async (cmd: Command) => {
const pkgPath = paths.resolveTarget(PKG_PATH);
const pkg = await fs.readJson(pkgPath);
const appConfigs = await findAppConfigs();
const npmrc = fs.existsSync(paths.resolveTargetRoot('.npmrc'))
? ['.npmrc']
: [];
const tempDistWorkspace = await createDistWorkspace([pkg.name], {
buildDependencies: Boolean(cmd.build),
files: [
'package.json',
'yarn.lock',
...npmrc,
...appConfigs,
{ src: paths.resolveTarget('Dockerfile'), dest: 'Dockerfile' },
],