You can also manually install peerDependencies for fixed versions
To create your first package, you may automate the required steps to define a new workspace using npm init.
npm init -w ./packages/a
When the package is ready, including the dependencies setup, run npm i in the project root directory to install all dependencies, including the workspaces.
Build system for monorepo
Most workspace packages will pre-set script commands, such as build, test, and lint. Since features depend on each other, builds will be executed sequentially.
You can now use Turborepo to easily build complex systems and run commands in one-linear.
{"scripts":{"dev":"turbo run dev","build":"turbo run build","test":"turbo run test --parallel","lint":"turbo run lint --parallel","type-check":"turbo run type-check --parallel"}}
In most cases, dev and build cannot add the --parallel flag, which breaks their dependencies.
Typical workspace scripts for authoring a package:
{"scripts":{"build":"ts-node ../techor/src/bin pack","dev":"npm run build -- --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"}}
From now on, you only need to run the command in the project root after opening the project.
npm run dev
Build your application or package:
npm run build
Test your business logic or UI by running scripts:
npm run test
Find and fix problems in JavaScript code before building:
npm run lint
Improve reliability with TypeScript's type checking:
npm run type-check
Continuous Integration
With the well-configured build system, almost all commands can be automated through CI, taking GitHub Actions as an example:
Build automated tests on the beta, the main, and the pull request stream:
The npm package techor receives a total of 188 weekly downloads. As such, techor popularity was classified as not popular.
We found that techor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 0 open source maintainers collaborating on the project.
Package last updated on 07 Aug 2023
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.