1.0.9 • Published 10 months ago

@dudojs/update-index v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@dudojs/update-index

An awesome utility to create/update index.js file

Usage

/**
 * @param {String} target Absolute path of target folder
 * @param {String} destination Absolute path of destination folder which "index.js" filw is created
 * @param {String} mode Read mode when create/update "index.js" file. If is "FILE", all JS file under target folder will be listed. If is "FOLDER", all sub folder under target folder will be listed. If is blank or null, all JS file and sub folder will be listed
 * @param {String} prefix Prefix string for export name. Default export name will be name of folder or file without extension.
 * @param {String} suffix Suffix string for export name. Default export name will be name of folder or file without extension.
 */
updateIndex(target, destination, mode, prefix, suffix);

Example

const updateIndex = require('update-index');
const path = require('path');
updateIndex(path.join(__dirname, './utils'), path.join(__dirname, './'), 'FILE', null, 'Util');

License

Please read at here

1.0.9

10 months ago

1.0.8

10 months ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago