I have a common shared library which houses buttons, input components, datepicker etc. this library is shared across many other applications. Now the shared library also has a sandbox playground code for developers to see which components the library has. I have a need to deploy the sandbox playground code to an internal server. How do i go about it? Should i have two package.json in the same repo or it would be better to have a separate repo for sandbox playground code. Please let me know my options here.
Below is the structure for both apps: (Image attached below)
> projects
component
src
assets
lib
package.json
tsconfig.lib.json
tsconfig.lib.prod.json
> src
app
components
tsconfig-app.json
polyfills.ts
> package.json (on root folder)
> tsconfig.json
> Jenkinsfile
> Dockerfile
projects/component/src/lib ------> shared library code
src/app ---------------> sandbox playground code
below is the package.json on root level:
{
"name": "shared-lib",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build_lib": "ng build component && scss-bundle -e ./projects/component/src/assets/_index.scss -d ./dist/component/assets/main.scss && npm run copy && npm run copy_themes",
"copy": "cpx \"./projects/component/src/assets/scss/{_variables.scss,_mixins.scss}\" dist/component/assets",
"copy_themes": "cpx \"./projects/component/src/assets/themes/*\" dist/component/assets/themes",
"npm_pack": "cd dist/component && npm pack",
"package": "npm run build_lib && npm run npm_pack",
"test": "ng test",
"lint": "ng lint",
"precommit": "lint-staged",
},
}