appmanifest
Validate web app manifest (http://w3c.github.io/manifest)
* Tries to follow the Spec as it is (as much as possible)
Try it online -
https://boopathi.in/appmanifest/
This project is still under active development. Ideas and contributions welcome :)
Install
npm install appmanifest
Usage
API
var result = manifestParser({
manifest: "<manifest json string>",
manifestUrl: "https://example.com/manifest.json",
documentUrl: "https://example.com/"
logger: function() { return { warn() {}, error(){}, log(){} } }
});
If you don't want to pass manifestUrl and documentUrl, just use example.com
urls as mentioned above.
Capture errors and warnings
You can pass your custom logger and capture all errors and warnings to compile and display later. The signature of the logger function is this.
function Logger (name ) {
return {
warn(message) {
},
error (message) {
},
log (message) {
}
}
}
Node
const parse = require('appmanifest').manifestParser;
Browser
- You can bundle this with webpack / browserify
- Generate your dist -
npm run dist
- Get it from CDN - https://npmcdn.com/appmanifest@latest/dist/manifest-parser.min.js
The library when obtained as a built bundle, exports UMD with ManifestParser
as the name.
Note:
If you're using the cdn URL, you need to use ManifestParser.default({})
;
Features
Processing
Spec: http://w3c.github.io/manifest/#processing
This helps in identifying possible mistakes in your manifest.json file in the following fields.
* The unchecked ones are not yet implemented
Installability Signals
Spec: http://w3c.github.io/manifest/#installability-signals
This tool is to identify from a URL, warnings about some of your app installability signals - to make it more installable - Does it even mean anything? Yes. It's a thing now. Live with it.
* The unchecked ones are not yet implemented
Note: There are a few others that cannot be checked with this tool. Feel free to visit the link mentioned above to help making your manifests better and give the browser possible installability signals.
CONTRIBUTING
Contributions and ideas are always welcome. Create an issue to discuss.
Build
License
MIT License - http://boopathi.mit-license.org/