We are open and grateful for any contribution made by the community. If you're interested in contributing to Builder.Group Community, this document might make the process for you easier.
The Open Source Guides website has a collection of resources for individuals, communities, and companies who want to learn how to run and contribute to an open-source project. Contributors and people new to open source will find the following guides especially useful:
Please read the full text, so that you are able to understand what interpersonal actions will and will not be tolerated.
The structure of the package.json file in this project should adhere to a specific format, as illustrated by the example structure below. This structure is based on the npm documentation for creating a package.json file.
{
"name": "@blgc/template",
"description": "Description of the package",
"version": "0.0.1",
"private": true, // Or false if package should be published to NPM
"scripts": {
"build": "shx rm -rf dist && rollup -c rollup.config.js",
"build:prod": "export NODE_ENV=production && pnpm build",
"clean": "shx rm -rf dist && shx rm -rf .turbo && shx rm -rf node_modules",
"install:clean": "pnpm run clean && pnpm install",
"lint": "eslint . --fix",
"publish:patch": "pnpm build:prod && pnpm version patch && pnpm publish --no-git-checks --access=public",
"size": "size-limit --why",
"start:dev": "tsc -w",
"test": "vitest run",
"update:latest": "pnpm update --latest"
},
"repository": {
"type": "git",
"url": "https://github.com/builder-group/community.git"
},
"keywords": [],
"author": "@bennobuilder",
"license": "MIT",
"bugs": {
"url": "https://github.com/builder-group/community/issues"
},
"homepage": "https://builder.group/?utm_source=package-json",
"dependencies": {
// Project dependencies here
},
"peerDependencies": {
// Project peerDependencies here
},
"devDependencies": {
// Project devDependencies here
}
}For specific packages, additional fields should be included as shown below. Note that the fields source, main, module, types, and files are usually required in packages:
{
// ..
// "scripts": ..,
"source": "./src/index.ts", // Entry file (source code)
"main": "./dist/cjs/index.js", // Entry point (CommonJS)
"module": "./dist/esm/index.js", // Entry point (ES Module)
"types": "./dist/types/index.d.ts", // Type definitions
// ..
// "devDependencies": {},
"files": [
// List of files to be included in your package
]
}@blgc/types is listed as a dependency to ensure it's automatically installed for consumers, preventing issues like any types for feature-x packages due to missing TUnionToIntersection.
For more details: Microsoft/types-publisher/issues/81.
Alternatives:
- Move
TUnionToIntersectioninto each package - Enforce
@blgc/typesas apeerDependency
By contributing to Builder.Group Community, you agree that your contributions will be licensed under the license defined in LICENSE.md.