Skip to content
This repository has been archived by the owner on Apr 29, 2018. It is now read-only.

johnwatkins0/composer-autoload-file-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

composer-autoload-file-generator

About

Takes an input directory and adds all enclosed files (recursively) to the autoload.files array in a composer.json file. Useful for projects containing many small non-class PHP files that must always be loaded.

Usage

This library provides a composer-autoload-file-generator binary that must be run in the same directory as the composer.json file (or an error will be thrown). Pass the directory (relative to the current location) whose files you want to autoload as the argument, e.g.

node_modules/.bin/composer-autoload-file-generator src/my-php-files/

Alternatively, create a composerAutoloadFiles.js config file in the project root with the following contents:

module.exports = {
  pathToFiles: 'your/directory/of/files',
};

Then just run node_modules/.bin/composer-autoload-file-generator.

You can also pass in a separate config file with a --config flag, e.g.:

node_modules/.bin/composer-autoload-file-generator --config my-config-file.js

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published