fs

Download and add registry items from your local filesystem.

SourceOfficial

The fs provider allows you to distribute code from your local filesystem. This is useful when you want to test out how your registries behave without having to deploy them somewhere first.

Usage

To start adding registry items from your local filesystem you first need to configure the provider in your jsrepo.config file:

jsrepo.config.ts
import { defineConfig } from "jsrepo";
import { fs } from "jsrepo/providers"; 

export default defineConfig({
	providers: [fs()], 
});

Now you can start adding registry items from your local filesystem:

jsrepo add fs://../registries/my-registry

You may also want to supply a base directory to the provider:

jsrepo.config.ts
import { defineConfig } from "jsrepo";
import { fs } from "jsrepo/providers";

export default defineConfig({
	providers: [fs({ baseDir: "../registries" })], 
});

Now your commands will be relative to the base directory you defined:

jsrepo add fs://./my-registry

Options

Prop

Type

On this page