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

grunt-springroll-download

v0.1.0

Published

> Download and extract games from SpringRoll Connect.

Downloads

6

Readme

grunt-springroll-download Build Status Dependency Status npm version

Download and extract games from SpringRoll Connect.

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install --save grunt-springroll-download

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-springroll-download');

SpringRoll task

Options

options.server

Type: String

Required as the end-point location for the SpringRoll Connect server. This URL must include the protocol ("http" or "https").

options.dest

Type: String

The path to the output directory for the games. Games are automatically saved as in a folder matching the slug of the game.

options.status

Type: String Default: prod

The global status to use for pulling games. This can either be prod, dev, stage or qa. For non-prod release status, a token option is required.

options.token

Type: String

A unique access token used for SpringRoll Connect to download non-public releases. It's recommended that you set your access token through an environmental variable. See section below SPRINGROLL_TOKEN.

options.json

Type: Boolean Default: false

Save JSON metadata associated with a game upon download. This data includes information like the version, title and capabilities.

options.debug

Type: Boolean Default: false

The downloaded archive will be the debug build of the game. The default downloads the release archive.

Game Settings

Each task contains a list of games. The game can be a String (the slug) or an Object with the following properties:

game.slug

Type: String Default: undefined

The SpringRoll Connect game slug. If slug is undefined, must define a game.bundleId.

game.bundleId

Type: String Default: undefined

The SpringRoll Connect game bundle identifier, alternative to game.slug.

game.status

Type: String Default: prod

The game status to use for pulling release. See the option status for more information.

game.version

Type: String Default: undefined

The specific version of a game to download. Versions should be in the Semantic Version schema (e.g. "1.0.0"). A token option is required to download a specific version.

game.commit

Type: String Default: undefined

The specific Git commit hash of a game to download. A token option is required to download a specific commit.

Environment Variables

It's recommended to use environment variables to ignore sensitive information from your project's version control. To setup this for OS X:

  1. Open up your bash profile vi ~/.bash_profile
  2. Add the environment variable to the file export SPRINGROLL_TOKEN=blahblahblah (where "blahblahblah" is your token)
  3. Save and then import the profile . ~/.bash_profile

SPRINGROLL_TOKEN

Type: String Default: undefined

Instead of settings options.token, you can define your personal access token through an environmental variable. This is recommended.

SPRINGROLL_SERVER

Type: String Default: undefined

Instead of settings options.server, you can define the path to SpringRoll Connect through an environmental variable.

Usage

Basic Usage

This configuration will download the latest production releases of each of the games to the output folder using the default options.

grunt.initConfig({
	springroll: {
		options: {
			server: 'http://springroll-connect.example.com',
			dest: 'deploy/games'
		},
		// list of games
		all: [
			'air-show',
			'pinecone-pass'
		]
	}
});

Game Settings

This configuration will download version 1.0.0 of air-show and the latest development release of pinecone-pass.

grunt.initConfig({
	springroll: {
		options: {
			server: 'http://springroll-connect.example.com',
			dest: 'deploy/games'
		},
		all: [
			{
				slug: 'air-show',
				version: '1.0.0'
			},
			{
				slug: 'pinecone-pass',
				status: 'dev'
			}
		]
	}
});

Dev and Release Version

This configuration will create two subtasks to download either the latest QA releases of the games, or the latest production versions of the games.

grunt.initConfig({
	springroll: {
		options: {
			server: 'http://springroll-connect.example.com',
			dest: 'deploy/games'
		},
		debug: {
			options: {
				status: 'qa'
			},
			games: [
				'air-show',
				'pinecone-pass'
			]
		},
		release: {
			options: {
				status: 'prod'
			},
			games: '<%= springroll.debug.games %>'
		}
	}
});