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-firefox-package

v0.3.0

Published

Generates a package.zip and mini manifest for your app.

Downloads

7

Readme

grunt-firefox-package

Generate a package.zip and mini manifest for your app.

Getting Started

This plugin requires Grunt ~0.4.5

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 grunt-firefox-package --save-dev

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

grunt.loadNpmTasks('grunt-firefox-package');

In your project's Gruntfile, add a section named firefoxPackage to the data object passed into grunt.initConfig().

grunt.initConfig({
  firefoxPackage: {...},
});

The 'firefoxPackage' task

Overview

To distribute a Firefox OS 'packaged' app outside of the Firefox store, you need two things:

  • A package.zip that contains your app source code and manifest.
  • A mini-manifest.webapp file that tells the system where package.zip can be downloaded, and also some basic info like the app's name.

Making the mini manifest is finicky, because it requires information to be duplicated from the main manifest, and installation will fail if those duplicated values don't match exactly (1).

Furthermore, it requires some additional information (such as the package file size) that mean it's not a simple copy/paste job. This task attempts to automate the process.

This task is intended to interoperate with grunt-firefox-manifest, such that you can use firefox-manifest to build your main manifest from your package.json, then use firefox-package to build the final distributable using the generated manifest.

Options

source

Type: String Default value: undefined
Example: 'dist'

Directory containing your built application source code and manifest.webapp.

outputPackage

Type: String Default value: undefined
Example: 'dist/packaged/package.zip'

Where to place the output package file in your project tree.

outputMiniManifest

Type: String Default value: undefined
Example: 'dist/packaged/mini-manifest.webapp'

Where to place the output mini manifest in your project tree.

packageUrl

Type: String Default value: undefined
Example: 'https://example.com/package.zip'

Location from which you plan to distribute your package.zip file.

Usage Examples

We have a build task that compiles and minifies our CSS and JS into a directory called dist. We want to include the contents of dist in the package, and create the zip and manifest in packaged.

grunt.registerTask('build', [
  ...
  'firefoxPackage:dist'
]);
grunt.initConfig({
  firefoxPackage: {
    dist: {
      options: {
        source: 'dist',
        outputPackage: 'packaged/package.zip',
        outputMiniManifest: 'packaged/mini-manifest.webapp',
        packageUrl: 'https://example.com/package.zip',
      }
    }
  }
});

Contributing

Pull requests/issues are welcome.

Release History

0.1.0

  • Initial release.

0.2.0

  • Rename task firefox_package->firefoxPackage.

0.3.0

  • Remove default 'options'; now all are required.
  • Fix misc issues in readme.