# composer-autoload-generator

> Node script to automatically generate a list of files from a passed-in directory path and save them to composer.json autoloaded files.

Latest version **1.0.13** (published 2017-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install composer-autoload-generator
pnpm add composer-autoload-generator
yarn add composer-autoload-generator
bun add composer-autoload-generator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2017-04-18 |
| First published | 2017-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | John Watkins |
| Maintainers | johnwatkins0 |

## Links

- npm: https://www.npmjs.com/package/composer-autoload-generator
- Repository: https://github.com/johnwatkins0/composer-autoload-generator
- Homepage: https://github.com/johnwatkins0/composer-autoload-generator#readme
- Issues: https://github.com/johnwatkins0/composer-autoload-generator/issues
- npm.io page: https://npm.io/package/composer-autoload-generator

## Dependencies (1)

- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.1.1

## Recent versions

- 1.0.13 (latest) — 2017-04-18
- 1.0.12 — 2017-04-18
- 1.0.11 — 2017-04-18
- 1.0.10 — 2017-04-18
- 1.0.9 — 2017-04-18
- 1.0.8 — 2017-04-18
- 1.0.7 — 2017-04-18
- 1.0.6 — 2017-04-18
- 1.0.5 — 2017-04-18
- 1.0.4 — 2017-04-18
- 1.0.3 — 2017-04-18
- 1.0.2 — 2017-04-18
- 1.0.1 — 2017-04-18

## README

# ComposerAutoloadGenerator
## Usage
### Example

In a file called `utils/generate-composer-autoload.js` in the Composer project root:

```js
import path from 'path';
import ComposerAutoloadGenerator from 'composer-autoload-generator';

const composerAutoloadGenerator = new ComposerAutoloadGenerator({
  pathToFiles: path.normalize(`${__dirname}/../lib`),
  composerRoot: path.normalize(`${__dirname}/../`)
});
```

On the command line (this example requires the `babel-cli` package with the `babel-preset-node6` preset):

```
./node_modules/babel-cli/bin/babel-node.js --presets node6 utils/generate-composer-autoload
```

### Settings

| Key | Type | Description |
| --- | ---- | ----------- |
| pathToFiles | string | The path to the directory containing files to autoload (recursive). The directory should be in the same location as the composer.json file. |
| composerRoot | string | The path to the directory containing the project's composer.json file. |

---
_Source: https://npm.io/package/composer-autoload-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
