https://github.com/savagecore/node-apache2-conf-formatter
A javascript port of https://github.com/bearx3f/a2conf - basic formatting
https://github.com/savagecore/node-apache2-conf-formatter
Last synced: 9 months ago
JSON representation
A javascript port of https://github.com/bearx3f/a2conf - basic formatting
- Host: GitHub
- URL: https://github.com/savagecore/node-apache2-conf-formatter
- Owner: SavageCore
- License: mit
- Created: 2018-05-22T17:14:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-28T12:57:47.000Z (about 3 years ago)
- Last Synced: 2025-03-07T19:11:17.548Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/apache2-conf-formatter
- Size: 1.28 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# apache2-conf-formatter [](https://github.com/SavageCore/node-apache2-conf-formatter/actions/workflows/npm-test.yml)
[](https://codecov.io/gh/SavageCore/node-apache2-conf-formatter/)
> Format apache2 configuration files
## Install
```
$ npm install apache2-conf-formatter
```
## Usage
```js
const apache2ConfFormatter = require('apache2-conf-formatter');
console.log(apache2ConfFormatter.format('httpd.conf'));
//=> Promise the formatted configuration file
```
## API
### format(path, [options])
Format the given file
**arguments:**
`path` the path to file.
`options` (optional) `Object` see [options](#options)
**returns:**
`Promise` \ the formatted configuration file
#### options
##### useTabs
Type: `boolean`
Default: `false`
Indent lines with tabs instead of spaces
##### tabWidth
Type: `number`
Default: `2`
Specify the number of spaces/tabs per indentation-level
## License
MIT © [SavageCore](https://savagecore.eu)