noapi-definejs-converter

    1.0.2 • Public • Published

    Noapi DefineJs Converter

    Convert the api definitions of Noapi app between three modes: array, object, file. Noapi is a light API framework for Node.js, easily define api and test case, easily I/O. You can focus on the business code, no need to care about how to manage api services, web service, routes, test cases, etc., improve your efficiency, save your time.

    Installation

    npm i noapi-definejs-converter --save

    Usage

    // /path/to/your/project/tools/convert.js
     
    const converter = require('noapi-definejs-converter');
     
    const options = {
        apiPath: './demo-app/api',
     
        // Three modes: "array" / "object" / "file",
        // If omitted, the inverse of source type is used:
        // If the source type is "object", then the target type will be "array";
        // If the source type is "array", then the target type will be "object".
        targetType: '',
    };
     
    // Do convert.
    // The original define.js file or sub directories will be backed up to the api.bak directory.
    converter(options);

    Test

    git clone https://github.com/hiowenluke/noapi-definejs-converter
    cd noapi-definejs-converter
    npm test

    License

    MIT

    Copyright (c) 2019, Owen Luke

    Keywords

    none

    Install

    npm i noapi-definejs-converter

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    22.7 kB

    Total Files

    31

    Last publish

    Collaborators

    • avatar