yarnpkg/yarn

'yarn pack' should not process .gitignore if .npmignore is present

Open

#754 创建于 2016年10月11日

在 GitHub 查看
 (9 评论) (5 反应) (0 负责人)JavaScript (41,514 star) (2,731 fork)batch import
cat-bughelp wantedtriaged

描述

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?

yarn pack ignores files specified in .gitignore while npm pack does not.

When .js files are generated from another language or flavor of javascript, generated files are often not checked-in and thus *.js or **/*.js entry is added to .gitignore. These generated files should be included in the package at runtime.

If the current behavior is a bug, please provide the steps to reproduce.

  1. create index.js file at project root.
  2. create .gitignore file at project root with entry *.js.
  3. run yarn pack.
  4. decompress package .tgz file.
  5. index.js file will not be in the decompressed package, only package.json and node_modules.

What is the expected behavior?

index.js should be there.

Please mention your node.js, yarn and operating system version.

Node.js v6.7 Yarn v0.15.1 macOS Sierra

贡献者指南