https://github.com/oscarotero/gpm
Git-based package manager for Deno
https://github.com/oscarotero/gpm
asset-management deno package-manager
Last synced: 9 months ago
JSON representation
Git-based package manager for Deno
- Host: GitHub
- URL: https://github.com/oscarotero/gpm
- Owner: oscarotero
- License: mit
- Created: 2021-08-07T12:31:14.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T15:56:48.000Z (about 4 years ago)
- Last Synced: 2025-08-26T05:19:26.575Z (10 months ago)
- Topics: asset-management, deno, package-manager
- Language: TypeScript
- Homepage: https://deno.land/x/gpm
- Size: 26.4 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# GPM
Git Package Manager: Simple Deno library to download git packages.
## Motivation
I just want to download assets from git repositories without depending on any
package registry like npm. For example,
[css packages](https://github.com/necolas/normalize.css),
[javascript polyfills](https://github.com/GoogleChrome/dialog-polyfill), etc.
But, at the same time, I want semantic versioning using the git tags.
## Usage
This is a Deno package, written in typescript:
```ts
import gpm from "https://deno.land/x/gpm/mod.ts";
const packages = [
// Use the github repository name (it download the latest tag)
"necolas/normalize.css",
// Or you can specify a version (tags)
{
name: "GoogleChrome/dialog-polyfill",
version: "0.5",
},
// And also configure the files/folders to copy
// (it uses package.json as fallback)
{
name: "oom-components/page-loader",
files: ["src"],
filter: (path) => path.endsWith(".js"),
},
// Use full urls to download files directly
"https://unpkg.com/react@17.0.2/umd/react.production.min.js",
// Custom destination folder
{
name: "oom-components/carousel",
dest: "./vendors/components/carousel",
},
];
const destination = "./vendors";
gpm(packages, destination);
```
## Cli
```bash
# Install
deno install --unstable -A https://deno.land/x/gpm/mod.ts
# Download necolas/normalize.css
gpm necolas/normalize.css
# Use the latest 7.x version
gpm necolas/normalize.css@7
# Set a different destination path
gpm necolas/normalize.css@7 --dest=./packages
```