Giter Site home page Giter Site logo

narcello / findead Goto Github PK

View Code? Open in Web Editor NEW
74.0 74.0 1.0 1.8 MB

:mag: Dead react components finder

Home Page: https://narcello.github.io/findead/

License: MIT License

Shell 66.60% JavaScript 31.57% TypeScript 1.83%
components dead finder hacktoberfest react shell

findead's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alissonblaas

findead's Issues

False Positives

Problem

After successfully installing using yarn global add [email protected] (per #74), and running findead path/to/dir, I get an output that contains many files that I've verified are used in the project.


Possible Cause

Many of the exports in my project use the structure

- ComponentDirectory
    - Component.tsx
    - index.tsx

Where index.tsx looks like

export { default } from './Component'

Predicates when run comand

  • Add argument for ignore folders to search components and to find usages
    • findead path/to/search/ -i path/to/ignore
  • Add helper
    • findead --help | -h
  • Use .gitignore option
    • -gi

Command not found after installing

Does this package have any dependency?
It doesn't seem to work in my setup ๐Ÿคทโ€โ™‚๏ธ

โžœ  npm install -g findead
added 1 package, and audited 2 packages in 661ms
found 0 vulnerabilities
โžœ  findead
zsh: command not found: findead

Thanks!

Incompatible with OS X

The version of grep installed by default on OS X is BSD grep, not gnu grep, and does not support the -P flag used in the bash script. Mac users can install gnu grep using homebrew, but this installs it as ggrep and not just grep. If the script could detect the current OS and either use OS X-compatible commands (some examples at https://stackoverflow.com/questions/16658333/grep-p-no-longer-works-how-can-i-rewrite-my-searches) or rely on ggrep, that would make it work on OS X.

Doesn't work on Windows

findead.cmd invokes bash.exe

@IF EXIST "%~dp0\/bin/bash.exe" (
  "%~dp0\/bin/bash.exe"  "%~dp0\pnpm-global\3\node_modules\findead\findead.sh" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  /bin/bash  "%~dp0\pnpm-global\3\node_modules\findead\findead.sh" %*
)

Add more datails

Log more details like:

  • How much time are taking
  • Spent on how many files
  • Which step of whole process are now
  • Show file path of dead component

Doesn't do anything

Hi!

I tried this tool with my project, but it didn't bring anything useful:

(develop *+$% u=)$ findead src/
==================================================================================================================== Findead is looking for components... =====================================================================================================================

=================================================================================================================================== Results ===================================================================================================================================
========================================================================================================================= No unused components found ==========================================================================================================================
================================================================== 1 browsed files in find: paths must precede expression: `jira.js'
find: possible unquoted pattern after predicate `-name'?
0,003 seconds ===================================================================

Remove sudo

Remove intern sudo and let final user type your own sudo

Wording

Findead are looking for components

should be "Findead is looking for components"

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.