Comments (9)
I know this is quite confusing, but ignore paths are absolute. So you need to use -i **/.idea
from micro-dev.
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.
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.
Hi @NetOperatorWibby, can you please describe your project directory structure and what files you want to ignore?
from micro-dev.
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.
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.
I usually put my own logic code into a sub directory for
- better searching (only search within that directory)
- 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.
@tungv Forgot to reply, that seems to have worked! Thanks for the help man.
from micro-dev.
You're welcome pal
from micro-dev.
Related Issues (20)
- Restore compatibility with micro@canary
- Update chokidar to v3 HOT 1
- Add cli arguments to documentation
- apollo-server-micro floods console with introspection logs HOT 3
- Provide an option to disable the auto copy to clipboard behaviour
- --ignore option not accepting glob HOT 1
- micro with next js restart every time on next compile
- micro-dev restarts on non-source code changes
- Yargs Parser Security Vulnerability
- Update all dependencies HOT 1
- Add ESLint and move to TypeScript
- print name of module file being used on startup.
- Purpose of SIGUSR2 signal? HOT 1
- Not compatible with `micro` v10.x HOT 3
- Windows node debugger: SyntaxError: missing ) after argument list HOT 1
- micro-dev exits on error HOT 3
- error Command failed with exit code 140 HOT 1
- UnhandledPromiseRejectionWarning thrown when content-type is not sent HOT 1
- add to readme: how to use custom now.json files with now-env
- Disable console logging? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro-dev.