untracked is a universal way for ingnoring unnecessary common files (such as README.md
, LICENSE.md
, Makefile
, Gruntfile
, Gulpfile
, karma.conf.js
, etc) to fit your bundle and create smallest production ready bunddle possible.
Just run the command
npx untracked
The files to ignore will be detected automagically ✨.
You need to write the output as .upignore
.
For doing that you can run the command directly
npx untracked > .nowignore
Also you can declare it as build hook
{
"hooks": {
"build": [
"npx untracked > .upignore"
],
"clean": [
"rm -f .upignore"
]
}
Just you need to write the output at .nowignore
file.
npx untracked > .nowignore
Yarn supports remove unnecessary files via .yarnclean
.
yarn install --production
npx untracked > .yarnclean
yarn autoclean --force
Sometimes you need to declare an extra file to include/ignore in the bundle.
That's could be achieve just declaring a untracked
field into your package.json
:
{
"untracked": {
"whitelist": [
"bin",
],
"blacklist": [
"bench",
"node_modules/@ffprobe-installer/darwin-x64",
"node_modules/@ffprobe-installer/linux-ia32",
"node_modules/@ffprobe-installer/win32-ia32",
"node_modules/@ffprobe-installer/win32-x64",
"node_modules/puppeteer/.local-chromium",
"scripts"
]
}
}
If you need to declare this files programatically, you can use any of the cosmiconfig supported ways for loading the configuration.
untracked create a list of common files to ignore using gitignore pattern format.
This makes it compatible with any builder process that supports ignore files based on this pattern declaration.
Under the hood, untracked supports file name variations for files such as
- Documentation (
docs
,LICENSE
,README
, etc). - Toolings configuration (
Makefile
,Gruntfile
,Gulpfile
,karma.conf.js
,etc). - Assets (
*.map
,*.d.ts
,*.flow
, etc).
It creates the properly gitpattern for ignoring any of these files.
- node-prune – Remove unnecessary files from node_modules (.md, .ts, ...).
- lambdapack – Package your AWS Lambda efficiently.
untracked © Kiko Beats, Released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub @Kiko Beats · Twitter @Kikobeats