Skip to content

JsDelivr command line interface ๐Ÿ˜Ž Install and consume 3rd-party client-side libraries from JsDelivr.

License

Notifications You must be signed in to change notification settings

lixinyang123/JsDelivrCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

89 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

JsDelivr command line Interface

Install and consume 3rd-party client-side libraries from jsdelivr.

Install

Download from Release page.

Usage

delivr
  JsDelivr CLI

Usage:
  delivr [options] [command]

Options:
  --version       Show version information
  -?, -h, --help  Show help and usage information

Commands:
  init               Initialize a package configuration file
  install <library>  install a package from jsdelivr
  remove <library>   remove a package from local
  search <library>   search package from npm
  info <library>     get library version info
  restore            restore client side package

Install a library

install
  install a package from jsdelivr

Usage:
  delivr [options] install <library>

Arguments:
  <library>  library name and version

Options:
  --version <version>  library version
  --dir <dir>          library install directory
  -?, -h, --help       Show help and usage information

Example:

# install jquery
delivr install jquery

# install jquery v3.6.0
delivr install jquery --version 3.6.0

# install jquery v3.6.0 in directory lib
delivr install jquery --version 3.6.0 --dir lib

Config library configuration file

{
  "Libraries": [
    {
      "Name": "jquery",
      "Version": "3.6.0",
      "Destination": "lib"
    },
    {
      "Name": "bootstrap",
      "Version": "5.0.2",
      "Destination": "lib"
    }
  ]
}

Restore dependences

delivr restore

How to Contribute?

Install pre-requisites

  • Windows

    • Visual Studio 2022, including .NET workload and Desktop development with C++ workload.
  • Linux

    • .NET 8 SDK
    • libicu-dev
    • cmake
On Windows
On Linux
  • Install .NET SDK

    • Ubuntu
    apt install dotnet-sdk-8.0 -y
    apt install libicu-dev cmake -y
    • CentOS
    dnf install dotnet-sdk-8.0 -y
    dnf install libicu-dev cmake -y

Restore dependencies

dotnet restore

Build & Run & Publish

dotnet build
dotnet run

Publish with NativeAOT

dotnet publish -r win-x64 -c Release
dotnet publish -r linux-x64 -c Release
dotnet publish -r osx-x64 -c Release

About

JsDelivr command line interface ๐Ÿ˜Ž Install and consume 3rd-party client-side libraries from JsDelivr.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published