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

ember-cli-deploy-redis-index-adapter

v0.0.2

Published

> An Index Adapter for use with ember-cli-deploy to upload the index.html to Redis

Downloads

15

Readme

ember-cli-deploy-redis-index-adapter

An Index Adapter for use with ember-cli-deploy to upload the index.html to Redis

Motivation

This addon is a pluggable adapter to be used with ember-cli-deploy. This allows users to choose which backend they would like to upload their index.html files to.

For more information on what ember-cli-deploy adapters are and how they work, visit https://github.com/achambers/ember-cli-deploy

Construction

The following properties can be set when creating an instance of this adapter:

connection (required)

Type: Object

The connection properties that allow this adapter to connect to a Redis store.

{
  host: 'localhost', //Redis host, defaults to localhost if not supplied
  port: '6397', //Redis port, defaults to 6379 if not supplied
  password: 'some-password' //Redis password, defaults to null if not supplied
}

appId (optional)

Type: String

Defaults to: 'default'

The identifier of the application who is using this adapter. This will make up the Redis key for which the index.html is uploaded.

versionCount (optional)

Type: Integer

Defaults to: 15

The number of previous versions that should be stored in Redis.

Interface

The following functions are implemented in this adapter:

#upload(data)

This function will upload the specified data to the Redis store specified by the connection properties that ember-cli-deploy passes in at construction time.

Firstly, this function will push the data to Redis with a key generated from the appId property appended to the current git sha of the Ember CLI project. So an example Redis key will look something like appId:abcde12345.

Secondly, the function will keep track of the versions of data that have been uploaded already by pushing the Redis key onto a list keyed by the appId. If the data for the current Redis key has already been uploaded, then an error will be thrown.

Finally, this function will trim the list of uploaded versions to a limit defined by versionCount.

#setCurrent(key)

This function will set a key called appId:current to be the version key specified. This will only happen if the version key specified is a valid version that has previously been uploaded.

The server that serves the index.html from Redis should look for the index.html file stored under appId:current if not query parameter has been passed in, specifying another version.

Installation

From within your Ember CLI application, run:

npm install --save-dev ember-cli-deploy-redis-index-adapter

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

Maintainers

Release History