Giter Site home page Giter Site logo

ignore-node_modules's Introduction

ignore-node_modules

Ignores node_modules directories from macOS Spotlight search

I got tired of Spotlight draining battery and CPU. It seems node_modules were partly to blame.

This script signals Spotlight to not index node_modules directories.

It works by adding an empty file named .metadata_never_index in the top-most node_modules directory found while searching.

Usage

Stop indexing all node_modules directories in your current directory (recursively):

./ignore-node_modules

Stop indexing all node_modules directories found within another directory (recursively):

./ignore-node_modules /path/to/folder

Install

You can install using Homebrew or manually build from source:

Install with Homebrew

Running this in your terminal adds my tap and installs the package:

brew tap blakek/blakek && brew install blakek/blakek/ignore-node_modules

Build from Source

  1. Either clone this repo or download the zip file
  2. Add ignore-node_modules to your $PATH (e.g. /usr/local/bin)
  3. Make sure file permissions allow execution (e.g. chmod +x ignore-node_modules). This shouldn't be necessary when cloning, but is likely when downloading from a browser.

License

MIT

ignore-node_modules's People

Contributors

blakek avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

paulozoom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.