npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-slice

v1.7.0

Published

[![npm version](https://badge.fury.io/js/git-slice.svg)](https://badge.fury.io/js/git-slice) [![npm](https://img.shields.io/npm/dt/git-slice.svg)](https://www.npmjs.com/package/git-slice)

Downloads

32

Readme

git-slice

npm version npm

Please be aware that one of git-slice dependencies nodegit doesnot properly work with Node 9.x, therefore until this problem is resolved we recommend that you to use Node 8.x instead.

This utility can be used to take out folder(s) from a git repository, fork it into a new git repository and eventually provide commands to sync changes between both repositories.

Commands

git-slice init

Optiions

Option | Input | Required | Allow Multiple | | :-------------: |:-------------:|:-----:|:--------:| | --repo | Relative path of the git repository to be sliced | YES | NO | | --branch | Name of the repository branch to be sliced | YES | NO | | --folder | Path of the folder from the repository root | YES | YES |

$ git-slice init frontent-public --repo ./../main-repo --folder src/frontend/public --folder src/frontend/Components/Login --branch develop

This command creates a new folder in the current directory and initiates a new git repository in it. In this case it will copy all the content from main-repo/src/frontend/public and main-repo/src/frontend/Components/Login, and places it in frontend-public/src/frontend/public and frontend-public/src/frontend/Components/Login respectively. In addition, this command also creates a config file frontend-public/git-slice.json to store configuration details.

git-slice pull

$ cd frontend-public
$ git-slice pull

If main-repo/src/frontend/public is updated, this command can be used to sync the updates into frontend-public/src/frontend/public.

git-slice push

$ cd frontend-public
$ git-slice push --branch updated-photos --message "changed public photos" --author-name "XYZ" --author-email "[email protected]"

Options

Option | Input | Required | :-------------: |:-------------:|:-----:| | --branch | Name of the branch to be created in the main git repository while pushing | YES | | --message | Commit mesasge used to commit changes in the main git reposirory | YES | | --author-name | Name of the author which will be used to commit in the main repository | YES | | --author-email | Email of the author which will be used to commit in the main repository | YES |

If frontend-public/src/frontend/public is updated, this command can be used to create a new branch named updated-photos in main-repo and sync the changes made in frontend-public/src/frontend/public to that branch. Later, a pull request can be created to merge these changes with the master branch.