🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@agrarium/plugin-bemjsd

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agrarium/plugin-bemjsd

Agrarium plugin for BEM JSDoc

latest
Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
1
-83.33%
Maintainers
3
Weekly downloads
 
Created
Source

Agrarium BemJSD Plugin

Agrarium plugin for BEM JSDoc. More info about JSD parser here.

Usage

npm i agrarium

Or use it standalone:

npm i @agrarium/plugin-bemjsd

In your .agrarium.js file:

const { PluginBemJSD } = require('agrarium');

module.exports = {
    src: ['./src/components'],
    plugins: [
        new PluginBemJSD()
    ]
};

Example of result data

console.log(chunk.data)

{
    bemjsd: [{
        jsd: {
            "jsdocType": "root",
            "modules": [
                {
                    "jsdocType": "module",
                    "name": "button",
                    "exports": {
                        "jsdocType": "class",
                        "name": "button",
                        "proto": {
                            "jsdocType": "type",
                            "jsType": "Object",
                            "props": [
                                {
                                    "key": "getText",
                                    "val": {
                                        "jsdocType": "type",
                                        "jsType": "Function",
                                        "returns": {
                                            "jsdocType": "returns",
                                            "description": "",
                                            "jsType": "String"
                                        },
                                        "description": "Returns text of the button"
                                    }
                                },
                                {
                                    "key": "setText",
                                    "val": {
                                        "jsdocType": "type",
                                        "jsType": "Function",
                                        "params": [
                                            {
                                                "jsdocType": "param",
                                                "name": "text",
                                                "description": "",
                                                "jsType": "String"
                                            }
                                        ],
                                        "returns": {
                                            "jsdocType": "returns",
                                            "description": "this",
                                            "jsType": "button"
                                        },
                                        "description": "Sets text to the button"
                                    }
                                }
                            ]
                        },
                        "augments": {
                            "jsdocType": "type",
                            "jsType": "control"
                        },
                        "bem": {
                            "jsdocType": "bem",
                            "block": "button"
                        }
                    },
                    "classes": {
                        "button": {
                            "jsdocType": "class",
                            "name": "button",
                            "proto": {
                                "jsdocType": "type",
                                "jsType": "Object",
                                "props": [
                                    {
                                        "key": "getText",
                                        "val": {
                                            "jsdocType": "type",
                                            "jsType": "Function",
                                            "returns": {
                                                "jsdocType": "returns",
                                                "description": "",
                                                "jsType": "String"
                                            },
                                            "description": "Returns text of the button"
                                        }
                                    },
                                    {
                                        "key": "setText",
                                        "val": {
                                            "jsdocType": "type",
                                            "jsType": "Function",
                                            "params": [
                                                {
                                                    "jsdocType": "param",
                                                    "name": "text",
                                                    "description": "",
                                                    "jsType": "String"
                                                }
                                            ],
                                            "returns": {
                                                "jsdocType": "returns",
                                                "description": "this",
                                                "jsType": "button"
                                            },
                                            "description": "Sets text to the button"
                                        }
                                    }
                                ]
                            },
                            "augments": {
                                "jsdocType": "type",
                                "jsType": "control"
                            },
                            "bem": {
                                "jsdocType": "bem",
                                "block": "button"
                            }
                        }
                    }
                }
            ]
        }
    }]
}

License MIT

FAQs

Package last updated on 30 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts