npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

enyo-depends

v0.0.6

Published

A simple dependency manager for EnyoJS apps.

Downloads

7

Readme

#enyo-depends

A better way to handle dependencies in Enyo.

##Installing

Until enyo-depends is on npm, you can install it the following way:

git clone git://github.com/presenter/enyo-depends.git
cd enyo-depends
npm install -g

You may need to run npm install with sudo.

##enyo.json

One of the key ways that enyo-depends works is through an enyo.json file that is included in your application. Other developers may also leverage this file to make their libraries more compatible with enyo-depends. When installing a library, if enyo-depends detects an enyo.json file, it will automatically include the library in your main package.js file.

You can also customize enyo.json to better fit your project, as by default enyo-depends assumes a file structure similar to bootplate.

Below is an example of an application/library's enyo.json file.

{
	"name": "my-app",
	"description": "An Enyo application using enyo-depends.",
	"version": "1.0.0",
	"package": "source/package.js",
	"lib": "lib/",
	"enyo": "enyo/"
	"dependencies": {
		"enyo-editor": "presenter/enyo-editor@master"
	},
	"engines": {
		"enyo": ">=2.1.0"
	}
}
  • "name" is the name of the application. This should be the same as your github repository's name. If you set a name different from your repo's name, then when installing the library it will install as that name.
  • "description" is a simple description of your application or library.
  • "version" is the version of your application or library. When running enyo-depends update, it will check this version to determine if an update is needed.
  • "package" is the location of your application's main package.js file. In bootplate, the main file is source/package.js.
  • "lib" is the folder that you wish to install libraries to. By default, the folder is lib/. Please note that if you set this in your enyo.json file that installing a library will not auto-include it in your package.js file.
  • "enyo" is the folder that holds the copy of Enyo used in your application. This defaults to enyo/, and can also be set using the --enyo flag when installing libraries.
  • "dependencies" is an object that contains your application or library's dependencies. When installing a library with enyo-depends install, it will automatically add the dependency to the object. Each dependency is a key-value pair, where the key is the name of the library and the value is the partial path to the github repo. The key can also be used to create an alias, as the library will be installed under a folder with that name.
  • "engines" is an object that should include a key named enyo. The value is the version of Enyo that is required for your library or application. This will be checked against the local version of enyo when installing. Any semantic versioning string will work.

##Using

You can install EnyoJS libraries with enyo-depends very easily using the command line.

###Installing A Library

First cd into the directory of your enyo application. You can then install a package using the following command, where "username/repo@branch" are the same as the GitHub repository containing the library. If you do not define a branch, then the master branch will be used.

enyo-depends install username/repo@branch

If the installer detects an enyo.json file in the library, then it will also install the libraries dependencies, and include all installed libraries in your app's package.js file.

###Uninstalling A Library

You can uninstall a library using the following command, where name is the same as the repo name (or the alias) used while installing.

enyo-depends uninstall name

The uninstall command will also remove all of the libraries included by the library unless the library is included in your application's enyo.json file. Note that currently this command could inadvertantly uninstall libraries that other installs brought in.

##Options

###--alias If you wish to install a given library under a different name, you can use create an alias, which will simply install the library under a differently named folder. It will also use the same alias when adding the dependency to your enyo.json file.

enyo-depends install presenter/enyo-editor --alias presenter

###--enyo If you do not have the core Enyo files in a folder named "enyo", then you can specify the location of enyo using this option. You may also specify the location of enyo in your enyo.json file.

enyo-depends install presenter/enyo-editor --enyo scripts/enyo

###--noenyo For all commands, enyo-depends ensures that the directory has enyo installed. You can override this behavior by using the --noenyo option.

enyo-depends install presenter/enyo-editor --noenyo

###--nodepends By default, installing a package adds it to your enyo.json file and includes it in your app's package.js file. Using this flag disables that behavior.

enyo-depends install presenter/enyo-editor --nodepends

##Notes

Please note that enyo-depends currently only supports libraries that are hosted on GitHub.