Suppose I have 2 node packages, one called parent
and one called child
. child has a package.json
with some scripts. Is it possible to include the scripts from child
in the context of parent
?
For example:
child/package.json:
"scripts":{
"hello":"echo hello"
}
parent/package.json:
"dependencies":{"child":"1.0.0"}
Then from the command line in the parent
directory:
parent> npm run hello
//outputs hello