-root
- node_modules
- packages
- migrator
- src
-index.js
- package.json
- package.json
root(package.json) -
{
"script" : {
"build": "npm run build --ws --if-present",
"lint": "npm run lint --ws --if-present",
"lint-fix": "npm run lint-fix --ws --if-present"
"test": "npm run test --ws --if-present"
"automation-tests": "mocha ./src/automation-tests/**/*.test.js"
}
"workspaces": ["./packages/*"]
}
migrator (package.json) -
{
"scripts": {
"test": "jest --coverage --verbose --colors --reporters=default --reporters=jest-junit",
"build": "rm -rf dist && mkdir dist && cp package.json dist && cp -r src dist",
"lint-fix": "retail-linter --sourceFolder=./ --type=javascript --fix",
"lint": "retail-linter --sourceFolder=./ --type=javascript"
}
}
I am working on a Node.js project and following the specified file structure. The issues I am facing are:
When I am inside the migrator folder and run npm i, it installs the packages for the parent project instead of the child project. On the server, it is generating two folders: dist and src, with src containing the same files as dist.