A package for build a single yml file from multiple source files.
npm install @janiscommerce/yml-builder

A package for build a single yml file from multiple source files.
sh
npm install @janiscommerce/yml-builder
`Usage (command line)
`sh
npx @janiscommerce/yml-builder -i sourceDir -o outputFile.yml
`$3
- The source files must be .yml or .yaml any other file types will be skipped.
- The input path and output file path starts from the current working directory.
- The output file will be replaced if it exists.
- The output directory will be recursively created if not exists.
- If there is not any source files in the specified input directory or not exists, an empty file will be generated.$3
`sh
--input, -i the path to your sources directory
--output, -o the path to the file that will be generated
`Examples
`sh
npx @janiscommerce/yml-builder -i permissions/src -o permissions/permissions.ymlWill get the source files from /path/to/root/permissions/src
Will generate the output file into /path/to/root/permissions/permissions.yml
`Usage (as module)
`js
const YmlBuilder = require('@janiscommerce/yml-builder');
`API
$3
Constructs the YmlBuilder instance, configuring the
input [String] and output [String] path.$3
Builds the ymls from the input path into the output file path.
Optionally you can specify the
input [String] and output [String] path, by default it will be obtained from the constructor config.Examples
`js
const YmlBuilder = require('@janiscommerce/yml-builder');const ymlBuilder = new YmlBuilder('input-dir', 'output-file.yml');
(async () => {
await ymlBuilder.execute(); // It will run the build process...
})();
``