• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

mozilla/firefox-app-validator-manifest: An npm module to test the validity of a ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

mozilla/firefox-app-validator-manifest

开源软件地址:

https://github.com/mozilla/firefox-app-validator-manifest

开源编程语言:

JavaScript 100.0%

开源软件介绍:

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 [email protected]: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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap