Skip to content

LukasHechenberger/toolsync

Repository files navigation

@toolsync/monorepo

Homepage

No more setting up the same 100 tools when starting a new project

Very opinionated by default, but following best practices and easy to customize.

Note

Still in development

About

Toolsync is a set of tools to configure the development tools in your monorepo. Instead of manually configuring

Toolsync will set them all up from a single (optional) config file, toolsync.json.

Check out our online documentation to find out more.

Packages

This repository contains the following packages:

Name Description Links
@toolsync/builtin Default toolsync plugins available NPM Version
@toolsync/cli The toolsync command line interface NPM Version
@toolsync/core Core functionality used in @toolsync/cli etc NPM Version
@toolsync/create no description NPM Version
@toolsync/logger The logger we use NPM Version
@toolsync/object-mods Type-safe object manipulation utility NPM Version
@toolsync/template Update sections of source files NPM Version
@repo/toolsync-plugins Some toolsync plugins we use in the toolsync monorepo :)
@toolsync/docs The sources of toolsync.vercel.app

Contributing

Run all tests in watch mode

bun turbo watch test

TODO

Just a bunch of stuff we want to implement in the future

Plugins

  • Node
    • Set engines in root package.json
    • Set node-version in github actions workflows
  • Pnpm
    • Set correct version in root packageManager
    • Set version in github actions install steps
    • Use catalog:* dependencies if configured
  • Package metadata
    • Sync meta fields like repository, url, author, etc.
    • Ensure private packages have the same scope (e.g. @repo/)
  • Package readmes
    • Header with package name, description, npm badge etc. for every package
    • List of packages in Root readme
    • Generate mermaid dependency graph in root
  • VScode
  • toolsync VScode extension
    • Show errors for files that will be overwritten
    • JSON schema for toolsync.json
  • prettier
    • Create .prettierrc
    • Add format script
    • Add vscode extension if enabled
    • Add format task to turbo.json (if enabled)
  • Github Actions
    • Basic CI workflow
  • ignore-sync
    • Install
    • setup "prepare" script
    • Create .prettierignore-sync if prettier is enabled
    • Add file associations to vscode settings
  • Turborepo
    • Create turbo.json
    • Create root scripts
    • Provide instructions on how to configure remote caching
    • Create generators for new packages
      • These should also init other tools
  • Eslint
    • Ensure all packages have an eslint config file
    • Add vscode extension if enabled
    • Ignore coverage files - Sync "ignores" with gitignore etc.
    • Configure vscode setting "eslint.workingDirectories"
      • Check first if "mode": "auto" isn't enough
    • Configure vscode setting "editor.codeActionsOnSave"
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": "explicit"
      }
    • Framework integration:
      • Create e.g. nextjs config if used
      • Disable nextjs eslint during build if github actions are used
      • nextjs:
        • create turbo.json like in docs/turbo.json
  • Publint
    • Ensure all packages have a "check:exports" script
    • Add "check:exports" to turbo.json if necessary
    • Add vscode extension if enabled
  • @manypkg/cli
    • Run during check
  • Changesets
    • Manage config file (?)
    • Setup github action
      • Provide instructions on how to configure GitHub settings (separate GITHUB_TOKEN)
    • Adjust "on" in ci workflow to include the default branch
    • Create a "prebuild" version of @changesets/cli that does not add 1000 runtime dependencies
  • Payload
    • Adjust eslint config for importmap etc.
  • Recommended: A builtin plugin that loads all other builtin plugins
  • Config schema: Generate a json schema for config file(s)
  • CLI
    • init should install @toolsync/cli and @toolsync/builtin (if needed) and run "prepare"
    • prepare should set up tools, update readme etc. for each package
      • Run from repo root to handle all packages
      • Should not run during CI to speed up build
    • check should call prepare and check if git status is clean - tovalidate setup during CI builds

      check could be a v2 feature

  • Github
    • Automatically update repo description + homepage
  • Tailwind
    • Setup prettier plugin
  • Renovatebot
    • Add renovate.json
  • Vercel
    • Add vercel.json with node version etc.
    • VSCode: Add "$schema": "https://openapi.vercel.sh/vercel.json" for vercel.json files to vscode settings,
    • Un-ignore turbo.json for vercel to detect it
  • Shadcn UI
    • Add vscode setting "tailwindCSS.experimental.configFile": "packages/ui/src/styles/globals.css" if inside a monorepo

Core

  • Allow configuration via package.json

  • Store generated file hashes to detect user customizations: Warn if a file is modified by the user, ask to reset or add to "customized" files list (?)

  • Allow individial packages to disable tools in their package.json (or toolsync.json ?)

    {
      "toolsync": {
        "@toolsync/builtin/toolsync": {
          "prettier": false
        }
      }
    }
  • Plugin's own default config should be loaded first so others/config file can override it

Logger

  • Get rid of pino packages

Docs

  • Add builtin plugins to search index

Known Issues

@toolsync/core does not check if a plugin's name matches the name it was loaded from. This can lead to naming conflicts during config merging etc.

About

No more setting up the same 100 tools when starting a new project

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •