This package has been deprecated

Author message:

update-index is deprecated! Please use @dudojs/update-index instead

update-index

1.0.3 • Public • Published

update-index

A 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

Readme

Keywords

none

Package Sidebar

Install

npm i update-index

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

4.06 kB

Total Files

6

Last publish

Collaborators

  • ducdhm