Skip to content

LekoArts/secco

Repository files navigation

secco

Local package testing made easy.

secco is a command-line tool for local development. It uses Verdaccio and direct file copying to apply your latest changes to other projects.

When developing and maintaining (multiple) packages, it's a real hassle to use something like npm link. But you also don't want to publish your changes to npm's remote registry. Both have a lot of pitfalls as they might break on complicated dependency chains or symlinking.

secco solves these problems and streamlines the process of local package testing.

Want to try it? Start with our Getting Started guide. Need a longer explanation? Read our Learn secco tutorial.

Features:

  • File Sync & Package Publishing. By default, changes will be copied over from the source into the destination's node_modules folder. If necessary, changes are published to a local Verdaccio registry first, so that you don't have to worry about symlinks or dependency hell.
  • Link Multiple Projects. secco reads the .seccorc file to make the connection between destination and source. This allows you to use secco with as many source folders as you wish.
  • npm, yarn, pnpm, and bun support. You can use any of these package managers in your source and destination projects.
  • Watch and CI mode. By default, secco starts a watch task. But you can also only run it once, enabling CI End-To-End testing use cases.
  • Workspaces. Your source & destination folders can be a monorepo using workspaces.
lekoarts.de Follow @lekoarts.de Mastodon Follow

Installation

Using a global installation:

npm install --global secco

You can also use npx to invoke it.

npx secco@latest --help
Current npm package version. Downloads per month on npm. Total downloads on npm.

Usage

It's recommended to also go through the Getting Started guide to understand how you can leverage secco in your projects.

secco uses the terms source and destination throughout its docs and messages. The source refers to the root folder that contains the package(s) that you want to test in other places. The destination refers to the folder you want to test your package(s) in. So your destination's package.json should have the source as a dependency.

secco requires to either find a .seccorc file in the destination (with source.path set) or that the SECCO_SOURCE_PATH environment variable is defined.

Here's an overview of all available commands and flags:

Usage: secco <command>

Commands:
  secco init                        Initialize a new .seccorc file
  secco packages [packageNames...]  Specify list of packages you want to link

Options:
  --help             Show help
  --version          Show version number
  --scan-once        Scan source once and do not start file watching
  --force-verdaccio  Disable file copying/watching and force usage of Verdaccio
  --verbose          Output verbose logging

Examples:
  secco                     Scan destination and copy files from source
  secco packages ars aurea  Copy specified packages from source to destination

Documentation

Visit secco's official documentation

Contributing

Want to improve secco? Great! Read the Contributing guide to get started.