1.0.6 • Published 4 years ago

react-native-gem v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

React-native-gem

React-native-gem is a node library which generates documentation for a javascript project including a special comment syntax.

⚠️ Warning you must follow the following comment syntax

Installation

Use the yarn manager yarn to install react-native-gem.

yarn add react-native-gem

Configuration

You must create two configuration files

module.exports = {
    project: '',
    output_path:'./output',
    target_folder:[
        './sources'
    ],
    target_regex:/.js$/
}

gem.setup.js

module.exports = {
    rules: [
        {
            name: "React.Component",
            label: "React Composant",
            name_regex: /@type React.Component/g,
            name_all_regex: /@type React.Component:.*/g
        },   
        {
            name: "Request",
            label: "Requête API",
            name_regex: /@type Request/g,
            name_all_regex: /@type Request:.*/g
        },
        {
            name: "Class",
            label: "Simple Classe",
            name_regex: /@type Class/g,
            name_all_regex: /@type Class:.*/g
        }
    ]
}

gem.rules.js

And finally you have to add in your package.json

"scripts": {
    "gem": "node ./node_modules/react-native-gem/index.js"
},

Usage

npm run-script gem

⚠️ Warning you must follow the following comment syntax

License

MIT