Monorepo boilerplate that I use, transformed into its own template repository.
Not working as of 22.12.2022 due to how base paths are configured with SvelteKit
Use this templatessh-keygen -t ed25519 -C "[email protected]" and copy the public key to Settings > Deploy keys > Add deploy key (I named it GH_ACTIONS_DEPLOY_KEY - public SSH key). Then copy the private key to Settings > Secrets > Actions with name GH_ACTIONS_DEPLOY_KEYSettings > Actions > General tick Allow all actions and reusable workflows Read and write permissions and check Allow GitHub actions to create and approve pull requests. This is required for the Changesets to create PRs and push tags (eg @awesome-org/[email protected]) from CI@awesome-org and @teemukoivisto using your own organization / usernameYou can publish your component & other packages to npm. However, to use private npm packages you must either upgrade your npm account or use Github package registry. There's a one example package at packages/private-pkg. Basically, how it goes is you must use your org/user name as the package's org. Then you must add a Github access token (I use the env GH_PAT) to the repository secrets which allows writing to package registry. Also anyone who wants to use that package will need an access token as well. Otherwise the flow is very much the same, use changesets to generate CHANGELOGs and code away!
You must have pnpm >=9 installed globally: npm i -g pnpm. Also you need Docker. And if you want to access the Postgres instance psql.
pnpm icp ./packages/api/.env-example ./packages/api/.env && cp ./packages/client/.env-example ./packages/client/.env && cp ./packages/db/.env-example ./packages/db/.envopenssl rand -base64 32docker-compose up -d postgrespnpm --filter db migratepnpm --filter db seedpnpm libpnpm clientpnpm apipnpm is a package manager that uses linking to reduce installation times.
It's pretty cool but sometimes the linking might get funky, eg you remove a package from packages/ and the links might not work anymore even after doing pnpm i. In that case trusty ol rm -rf ./**/node_modules && pnpm i helps.
pnpm --filter api add jsonwebtoken.pnpm --filter client add -D rollup-svelte-pluginpnpm --filter client lintpnpm -r lint. NOTE: this will halt on first error so you might want to run it as script instead with concurrently.pnpm --filter=!api lintpnpm updateThis project uses changesets https://github.com/changesets/changesets to generate changelogs but in short, when you commit from terminal the changeset prompt is opened in which you should write your functionality using conventional commits https://www.conventionalcommits.org/en/v1.0.0/ to create a changeset (which is for something that changes the library for the downstream users).