Closed debender495 closed 4 years ago
This would work
yo lerna-typescript:package @demo/adder yo lerna-typescript:package @demo/calculator lerna add @demo/adder --scope=@demo/calculator
// packages/calculator/src/index.ts
import { add } from '@demo/adder';
function multiply(a: number, b: number): number {
return add(a, b) * 2;
}
console.log(multiply(2, 3));
lerna bootstrap node ./packages/calculator
see 10
Let's say package greeting has function returning 'hi', and I want to use this function from other package say B. how can I add the dependencies of the greeting in the package B