relative-deps icon indicating copy to clipboard operation
relative-deps copied to clipboard

Support a specific package from the list to be watched locally?

Open d2c-sean-li opened this issue 4 years ago • 2 comments

is there a way to allow picking specific dep from the list but leave others. when i have this configuration set in the package.json

 "relativeDependencies": {
    "@internal/package1": "../package1",
    "@internal/package2": "../package2"
  }

when i run relative-deps, can i specify only the packge1 will be watched locally but package2 is not? i do not keep watching two folders in my watch mode.

d2c-sean-li avatar Oct 29 '20 20:10 d2c-sean-li

No that is currently not possible

On Thu, 29 Oct 2020, 20:32 Sean Li, [email protected] wrote:

is there a way to allow picking specific dep from the list but leave others. when i have this configuration set in the package.json

"relativeDependencies": { "@internal/package1": "../package1", "@internal/package2": "../package2" }

when i run relative-deps, can i specify only the packge1 will be watched locally but package2 is not? i do not keep watching two folders in my watch mode.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mweststrate/relative-deps/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBDVNIBW7REXJ2QOYKTSNHGPVANCNFSM4TEG7ACQ .

mweststrate avatar Oct 29 '20 21:10 mweststrate

@d2c-sean-li

You can run relative-deps from nodemon.

package.json

{
  ...
  "scripts": {
    "<package1>.watch": "nodemon --watch <pathToPackage1Dir> --exec relative-deps",
    "<package2>.watch": "nodemon --watch <pathToPackage2Dir> --exec relative-deps"
  },
  "nodemonConfig": {
    "ext": "ts,js",
    "delay": 500
  }
}

--watch - you setup directory, where files watches nodemonConfig.ext - file extensions for watching delay - --exec runs only one time per 500ms

stepan-perlov avatar Nov 04 '21 17:11 stepan-perlov