Package Exports
- node-matrix-asset-list
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-matrix-asset-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-matrix-asset-list
A requireable object list of Squiz Matrix' core assets.
Extracted using the JS API getAssetTypes function.
Usage
var assets = require('node-matrix-asset-list');
node-matrix-asset-list
provides a simple querying interface wich allows you to retrieve
asset info with the following:
console.log(assets('page_standard').name); // asset type code
console.log(assets('Standard Page').name); // capital case name
console.log(assets('standard page').name); // lower case name
// all return 'Standard Page'
In addition you can require directly the entire assets object with:
var assets = require('node-matrix-asset-list/assets');
with which you can select assets via their type code:
console.log(assets['page_standard'].name);
// 'Standard Page'
License
MIT