-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a separate config file from .watchmanconfig #14
Comments
Why not remove the example dir from the ignore_dirs array. And delete example dir with postinstall script like:
|
That's what I've ended up doing actually. It's not perfect but it works (without wml). |
@cooperka my bad... this is my script
I cannot set TripApp in .watchmanconfig and after npm run wml:start my TripApp folder is copied into dest library -> /node_modules/TripApp/node_modules.. |
To solve this I added an ignore key to every wml config file object, where you can list folders to ignore. This is read when copying files, so it doesn't copy these folders. I forked this package and put it here: https://github.com/Code-From-Anywhere/dryduck |
Background
In my project, I have a React Native library with an example app inside of it (a very standard setup). I'd like to link the root library into the example app's
node_modules
, which is easy to do with wml (yay!) simply by adding theexample
dir to theignore_dirs
array (to prevent infinite recursion) and runningwml start
.Problem
The problem comes when I want to run unit tests in the main library, or
npm start
in the example app. The React Native packager needs to be able to find the example app, but it can't because it's ignored! I also can't addnode_modules
toignore_dirs
because then none of the unit tests would be able to find any modules in the root library. This leads to@providesModule
conflicts because there are duplicatenode_modules
being found which were copied by wml into the example app.I end up getting this error when trying to run the example app on a device (because the entire
example
directory is ignored by watchman):And this error on the node server at the same time as the error above:
Desired solution
I want wml to ignore
node_modules
andexample
when copying, but I don't want the unit tests or the React Native packager to ignore either of those directories. Is there any way to get finer-grained control over which files wml ignores vs. which ones watchman ignores?I know wml uses watchman behind the scenes so maybe this isn't even possible. Any ideas would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: