Giter VIP home page Giter VIP logo

Comments (9)

tungv avatar tungv commented on May 22, 2024 2

I know this is quite confusing, but ignore paths are absolute. So you need to use -i **/.idea

from micro-dev.

tungv avatar tungv commented on May 22, 2024 1

oh I see, this PR #54 broke the tip I gave above.
However, I believe you can achieve your requirement by only watching a whitelist of files.

Given your actual server logic is resided in src folder, you can run:

micro-dev src/index.js -l 5mb -w src -p ${PORT:-3000}

I'm also a heavy user of micro-dev and I agree with you that --ignore is not well-documented and its behavior changed a lot without notice.

from micro-dev.

NetOpWibby avatar NetOpWibby commented on May 22, 2024

This is not working for me. I even asked a mod on the Slack how to properly ignore files a few weeks ago and he had no idea. Frustrating.

from micro-dev.

tungv avatar tungv commented on May 22, 2024

Hi @NetOperatorWibby, can you please describe your project directory structure and what files you want to ignore?

from micro-dev.

NetOpWibby avatar NetOpWibby commented on May 22, 2024

Sure!

I have two folders at the base of my project, processed and raw. I dump files into the latter for transcoding or whatever and then they get dropped in the former. I want to ignore any activity those folders perform.

I tried micro-dev -l 5mb -i processed -i raw -p ${PORT:-3000} and variations, including adding a prefixed/appended / to the folder names and a couple hours ago, the tip you mentioned gave me an error about regex matching.

from micro-dev.

NetOpWibby avatar NetOpWibby commented on May 22, 2024

My server logic is actually like this:

lib
 ... other logic
modules
 ... custom modules
processed
raw
.gitignore
index.js
package.json
README.md

I'm watching more than I'm ignoring so using the ignore flag would be ideal. I hadn't thought about watching though.

from micro-dev.

tungv avatar tungv commented on May 22, 2024

I usually put my own logic code into a sub directory for

  1. better searching (only search within that directory)
  2. cases like this, eg: watching, ignoring

If I understand correcly, the hot codes you want to watch for changes are inside lib and the root index.js. Since the file you start micro-dev with will always be watched, so you can just -w lib.

from micro-dev.

NetOpWibby avatar NetOpWibby commented on May 22, 2024

@tungv Forgot to reply, that seems to have worked! Thanks for the help man.

from micro-dev.

tungv avatar tungv commented on May 22, 2024

You're welcome pal

from micro-dev.

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.