Bash command line utility for jspkg.com
Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
VERSION
jspkg
jspkg-test.sh

README.md

JSPkg bash script

Installs JS packages from http://jspkg.com

install

jspkg is a shell script, so just download the jspkg file and add it to your $PATH.

For example, on OSX, you might do:

curl -L -o jspkg https://raw.github.com/JangoSteve/jspkg-bash/master/jspkg
chmod +x jspkg
PATH=$(pwd):$PATH
export PATH

usage

Run jspkg COMMAND VALUE. The main command you'll be using is install:

jspkg install EasyTabs

This will install EasyTabs from jspkg.com/packages/easytabs to CURRENT_DIRECTORY/easytabs/.

For more info, run jspkg -h

todos

  • get permalink for package name
  • install package
  • install package with explicit version
  • uninstall package (?)
  • install collection of packages
    • send list to server to retrieve list of resolved dependencies
    • install all packages from retrieved list
  • track packages installed to directory with PKGFILE
    • generate / update PGKFILE.lock when packages installed

tests

To run tests, install roundup and run URL=http://localhost:3000 roundup jspkg-test.sh.

You will need a local version of JSPkg running at http://localhost:3000 with the command above. This may not be possible if you don't have access to the repo. As such, you may point the tests at http://jspkg.com, but we ask you to do this sparingly, as it will affect the download counts of the production site.

credits

Written by Steve Schwartz (jangosteve).

This script was influenced largely by spark and rbenv.