@liquid-js/gitpkg

1.0.0-beta.2 • Public • Published

gitpkg

Publish packages as git tags

🔧 Works with projects with build steps.
👯 Works with projects with multiple packages (monorepos).
🏎 Lightweight git tags (only the files needed are included).

Table of Contents

Background

Both npm and yarn support installing packages from git tags.

But things can get difficult with packages that have a build step (eg babel) and monorepos with multiples packages (eg lerna).

gitpkg publish creates a git tag with the same files as if you were running npm publish or yarn publish and uploads the generated git tag to a git repository.

Also you can publish any gitpkg package to the same repository, so you can have only one repository used as common registry and you get away from your project git repository the git tags with the build code.

Terminology:

  • gitpkg package: git tag generated by gitpkg.
  • gitpkg registry: git repository used as common host for your gitpkg packages.

Install

Node.js v6.5 or newer is required.

npm registry

Via the yarn client:

$ yarn global add gitpkg

Via the npm client:

$ npm install -g gitpkg

gitpkg registry

Via the yarn client:

$ yarn global add ramasilveyra/public-registry#gitpkg-v1.0.0-beta.1-gitpkg

Via the npm client:

$ npm install -g ramasilveyra/public-registry#gitpkg-v1.0.0-beta.1-gitpkg

Usage

Publish

Publishes a package to a git repository, by default uploads the package to the git repository in the git remote origin (git remote -v to see your git remote origin url). The package published is defined by the package.json in the current directory.

$ gitpkg publish

See in action.

--registry, -r

$ gitpkg publish --registry git@mygit.server:org/private-registry.git

This flag tells gitpkg to publish the package to a specific gitpkg registry.

You can also set the gitpkg registry permanently by adding "gitpkg":{"registry":"git@mygit.server:org/private-registry.git"} to the package.json.

Contribute

Feel free to dive in! Open an issue or submit PRs.

gitpkg follows the Contributor Covenant Code of Conduct.

License

MIT © Ramiro Silveyra d'Avila

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.0-beta.20latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.0-beta.20

Package Sidebar

Install

npm i @liquid-js/gitpkg

Weekly Downloads

0

Version

1.0.0-beta.2

License

MIT

Unpacked Size

47.6 kB

Total Files

39

Last publish

Collaborators

  • hitko