This is part of the [ES-Git](https://github.com/es-git/es-git) project.


0.10.09 months ago4 years agoMinified + gzip package size for @es-git/node-fs-repo in KB



This is part of the ES-Git project.


npm install --save @es-git/node-fs-repo


This is an implementation of IRawRepo that uses the file system for storage. It uses the node fs and therefore really only works on the server. Use this to interface with an existing git repo created with the git cli.

important: you should use the zlib-mixin if you want to load an existing git repo created with the git cli.

import Repo from '@es-git/node-fs-repo';

const repo = new Repo(__dirname + '/.git');

await repo.init();

constructor(path : string)

Creates the repository instance. The path parameter points to a location in the filesystem where either a repo already exists or a new one should be made.

init() : Promise<void>

Initialize a new empty repository at the path provided in the constructor.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.