1.0.2 • Published 4 years ago

noapi-definejs-converter v1.0.2

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

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

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago