Getting Started
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.
Install secco
Using a global installation:
You can also use npx
to invoke it.
Initialize a .seccorc
file
In order to link the destination to your source (terminology explainer), secco utitlizes its own .seccorc
configuration file. This way you only need to provide that information once, on all consecutive runs secco
automatically looks in the right spot.
-
Navigate to your destination and run the following command in your terminal:
-
When the prompt asks, “What is the absolute path to your source?”, enter the absolute path to your source.
-
The prompt will show you a summary of what
secco init
will do. When the prompt asks, “Do you want to create the file?”, enter “Y”.
You should have a new .seccorc
file inside your destination.
Start secco
Before starting secco, you should ensure that your source’s entrypoints are available. This could mean that you have to compile your source files (ideally in watch mode). Otherwise secco
won’t find anything to copy over.
Inside your destination, start secco
like so:
secco will now scan your destination’s package.json
file and compare its dependencies
/devDependencies
with packages that it can find inside the source.
If necessary, secco publishes your source to a local Verdaccio registry. This won’t happen every time (especially on consecutive runs) as secco then just uses file copying directly. When Verdaccio is used, the terminal prints this:
In any case, when secco copies over the files from the source to destination you’ll discover a similar terminal output:
Now go back to your source, edit a file, and let the file be re-compiled. secco should copy over the new file into your destination again.
What’s next?
Browse the CLI reference: commands, config options, and flags. You can also check out the advanced guides like Continuous Integration.