About JSPkg

JSPkg started with our frustration with finding the best JavaScript projects for the job, as well as with managing the downloadable packages for our own JavaScript projects.

The rest can be summed up in a little Q&A.

Follow @JSPkg on twitter for status updates and new features

What does JSPkg do?

It hosts the downloadable .zip files for JavaScript projects, with as little effort required as possible. It also tracks the number of downloads for each project to give context to the adoption of the project within the community.

So it competes with Github?

No. JSPkg does not do source control, only the final packaged product. It's like the Gemcutter of the JavaScript world. In fact, direct Github integration is coming very soon. Then, perhaps Bitbucket, and then who knows.

For now, you can import from any publicly-accessible git repository.

Import from Git Git-icon

Why do projects require a package.json file?

Rather than having project maintainers constantly re-entering meta-data about their projects, such as the name, version number, dependencies, etc. every time they want to upload a new package (or version), we thought it would be best to simply keep a file in the project's source that contains the structured meta-data for the project. Then you simply need to bump the version number in the file and save it, before uploading the new release. It's like a Ruby gemspec for JavaScript projects.

And as it turns out, a spec for such a structured meta-file already exists as part of the CommonJS movement and has been adopted by projects such as NodeJS. That file is called package.json. We decided we liked it and that it wouldn't be a bad thing if all JavaScript projects adopted it.

Learn more

Is there a Command Line Interface (CLI)?

Not yet. The command line has been the goal from the beginning. Ideally, we want *every* JS developer to be able to use this, so we wanted to make sure we have all the bases covered. The game plan is to start with the lowest common denominator: a slick web interface that absolutely everyone can use.

One of the issues with creating a command line utility is that it usually has to be built in some higher-level language or framework, which then has to be installed on the user's computer. Projects like Rubygems have the advantage of knowing that the user will have ruby installed. NPM knows the user will have Node.js. But for front-end JS packages, we really can't be sure they'll have anything installed. It'd be nice to avoid making front-end developers install something only tangentially related. It would be really cool to have a command line utility just written in bash to do commands like such as jspkg install easytabs and string together curl and unzip commands.

All that being said, we have designed a nice restful API into the site from the very beginning, and will soon be adding documentation.

Furthermore, we've made JSPkg.com a CommonJS package registry, so any CLI tools that can communicate with a registry should be able to plug into JSPkg as a repo. For a list of such repos, check out our CLI Projects info page.

Is JSPkg for jQuery Plugins?

Yes, but much more than that. We'll admin, we initially wanted a place to host our jQuery plugins exclusively. But then, as we thought about it, we realized that jQuery plugins are no more than normal JavaScript projects with a dependency on jQuery, another JavaScript project itself.

So why not host all JavaScript projects and just be smart about resolving dependencies? And that's just what we did.

Does JSPkg provide a CDN, so I don't have to download the files?

Not yet, but the JSPkg CDN is on its way.

What does JSPkg's technology stack look like?

JSPkg is built atop Rails 3.1 and jQuery, hosted on Heroku. We will soon be open-sourcing a lot of the code-base as soon as we get it off the ground. It uses many open-source projects, including jQuery, Twitter Bootstrap, and a number of RubyGems.

It may have been more poetic to build this site in Node.js or some other JS-based framework. But we wanted to get the job done and Rails is what we know best!

JSPkg uses the Fugue small icon set, and the logo comes from the open-source JS logo developed at JSConf.