Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jsdl

miceve3ISC1.2.3

An library for downloading front-end js libraries

js, front, front-end, cdn, download, backend, frameworks, cli, javascript

readme

JavaScript Downloader

JavaScript Downloader is a simple library for help you to download other js libraries. It is very simple in use:

cd /user/me/my-awesome-project/
jsdl jquery.min.js

or

cd /user/me/my-awesome-project/
npx jsdl jquery.min.js #this command will work even without installing jsdl CLI!

After this command you can find jQuery library in root of your project (in example root of project is /user/me/my-awesome-project/). Also it have a NodeJS api. Usage:

const jsdl=require("jsdl");
jsdl("library you need",callback);

Callback calls with one argument - code of library. Example - Usage with express:

let app=require("express");
let jsdl=require("jsdl");
app.get("/",(req,res)=>{
  res.sendFile("index.html")
})
app.get("/js/jquery.min.js",(req,res)=>{
  jsdl("jquery.min.js",(code)=>{
    res.send(code)
  })
})
app.listen(8080)

To use CLI (jsdl command) you need install this library globally. Windows users:

npm install -g jsdl

Linux/MacOS users:

sudo npm i -g jsdl

To use API in your project install it locally:

cd my-project
npm i jsdl

But you can use CLI without installing! Just use npx command instead native jsdl CLI. (npx jsdl instead jsdl, arguments like with CLI).