Skip to content
This repository has been archived by the owner on Dec 21, 2018. It is now read-only.

mozilla/firefox-app-validator-manifest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firefox App Validator: Manifest

Build Status

What it is

This is the Firefox App manifest validator for verifying that your manifest.webapp file has the correct information before submitting to the Firefox Marketplace.

Setup

git clone git@github.com:mozilla/node-firefox-app-validator-manifest.git
cd node-firefox-app-validator-manifest
npm install

Checking your manifest: an example

var fs = require('fs');
var Manifest = require('firefox-app-validator-manifest');
var ff = new Manifest({
    url: '/path/to/custom/url/module' // custom URL module if you want to override the node one
});

fs.readFile('manifest.webapp', 'utf8', function (err, data) {
  if (!err) {
    var results = ff.validate(data, options);

    // If there are any errors or warnings, this will have them listed.
    console.log(results);
  }
});

Options

The first parameter to the validate() method expects a webapp manifest. The second parameter, however, can be an object containing validation options.

These options include:

  • listed - default false, flag whether or not this app will be listed on the Marketplace

  • packaged - default false, flag whether or not this app is packaged, rather than a plain web app

Tests

# To run tests once
npm test

# To run tests continually on file change
npm run-script testwatch

License

Mozilla Public License Version 2.0

About

An npm module to test the validity of a webapp manifest file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published