Skip to content

Commit

Permalink
Don't check "files" in package.json or .npmignore if private pack…
Browse files Browse the repository at this point in the history
…age or not publishing (#472)
  • Loading branch information
chinesedfan authored and sindresorhus committed Nov 30, 2019
1 parent 23524b5 commit 000ddcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ module.exports = async (options, pkg) => {
const oldVersion = pkg.version;
const extraBaseUrls = ['gitlab.com'];
const repoUrl = pkg.repository && githubUrlFromGit(pkg.repository.url, {extraBaseUrls});
const runPublish = options.publish && !pkg.private;

checkIgnoreStrategy(pkg);
if (runPublish) {
checkIgnoreStrategy(pkg);
}

console.log(`\nPublish a new version of ${chalk.bold.magenta(pkg.name)} ${chalk.dim(`(current: ${oldVersion})`)}\n`);

Expand Down

0 comments on commit 000ddcf

Please sign in to comment.