Code Monkey home page Code Monkey logo

Comments (5)

mjunker avatar mjunker commented on July 20, 2024 1

Yes sounds great!

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024 1

Hi @mjunker - I've implemented the feature in version 1.78.0. Please re-open this issue if the solution doesn't work for you.

Thanks again for the suggestion!

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024

Hi @mjunker ,

right now this is not possible - they best approach would be to run the mass refactoring on the subfolders that should be included (e.g. src).

That being said, this is a high-priority feature that I want to implement in the next weeks. Right now I'm trying to understand the different use cases better to come up with a good first implementation (since changing configs is always a backwards compatibility issue). The use cases I've seen so far include excluding directories such as node_modules, and to have different configurations for different teams that own subfolders (in a mono repo).

I would love to understand what kind of directories are you trying to exclude and why? Would this exclusion need to apply for all refactorings or just a subset?

Best, Lars

from js-assistant.

mjunker avatar mjunker commented on July 20, 2024

Hey

Thanks for your reply. Will try this.

Yeah I would like to exclude dist folders and node_modules mainly, but also have a project where I have to commit some third party code into the repo which I don't want to touch. Also generated configuration files I probably would want to exclude. I'm working with a Nx Monorepo which doesn't have a single src folder, but multiple top level folders, which makes it a bit more cumbersome if I have to run the mass refactoring on multiple top level folders individually.

For me the best solution would be a global exclude for all refactorings, something like a .gitignore file would work really well for me.

Best Matt

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024

Thanks! Right now I'm thinking the following solution might work:

In p42.toml (to keep the number of config files low):

# Exclusion globs (for refactoring & mass refactoring)
excludedPathPatterns = [
    "**/node_modules/**",
    "**/dist/**",
    "some/other/directory/**",
    "**/generateConfig.js"
]

This would affect both mass refactorings and in-editor refactoring suggestions (which would not be shown for the excluded files).

Would this solution work for you?

from js-assistant.

Related Issues (20)

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.