Open mbid opened 6 years ago
Can't you just use --ignore-files
?
Sure, but I could've also used that for node_modules
. web-ext ignores some files because (I suppose) it's more convenient and less error-prone than specifying them every time. So I assumed that some more files should be ignored by web-ext by default. E.g. package.json
and package-lock.json
, which are very often also present if node_modules
is and should not end up in the bundle.
Yeah, that's true. I guess putting those files in the default list would make sense.
Also, once we have config files then you could use one to set the value of --ignore-files
.
What's weird is that web-ext build
ignores the web-ext-artifacts folder by default, but web-ext sign
does not. That caught me off guard as it published my extension containing all the older builds of it, which was quite a bloated install for thousands of users.
@carlin-q-scott That sounds like a bad bug. Could you open a new issue with steps to reproduce, including the version number and the output with the --verbose
flag?
@Rob--W Sure I guess. It seemed pretty closely related to this issue but I guess there's a difference in the impact of the bug.
Also please ignore common dev's files like: README
, README.txt
, README.md
, LICENSE
, LICENSE.txt
, LICENSE.md
, CONTRIBUTING.md
, HACKING
, CODE_OF_CONDUCT.md
etc.
GitHub repos can also have .github
folder.
It also would be nice to exclude IDE's specific files like .idea
which is created by WebSrorm.
Maybe it even will be easier just to ignore all files from .gitignore
I would expect built artifacts (e.g. generated by tools like webpack) to be .gitignored. Excluding those in the build output would result in non-functional extensions, so I don't think that we should automatically import the ignores from .gitignore
.
I think web-ext
could use modules like these to exclude common junk:
https://github.com/sindresorhus/junk/blob/master/index.js https://github.com/novemberborn/ignore-by-default/blob/master/index.js https://github.com/abranhe/init-gitignore/blob/master/gitignore/Node.gitignore
Is this a feature request or a bug?
A feature request.
What is the current behavior?
web-ext only ignores a very limited set of files, e.g. dot files,
.zip
s and thenode_modules
folder.What is the expected or desired behavior?
web-ext should also ignore other common build files. For example, I have
package.json
,package-lock.json
,yarn.lock
, andweb-ext-artifacts
in my project directory, which shouldn't end up in the.xpi
.