feat: ability to add banner (#20)
Lets you add a custom banner. ```sh create-index src -u --banner "/* eslint-disable */" ``` ```js /* eslint-disable */ // @create-index import xxx ... ```
This commit is contained in:
committed by
Gajus Kuizinas
parent
d7e2528999
commit
fdb17d0179
@@ -35,7 +35,9 @@ export default (directoryPaths, options = {}) => {
|
||||
|
||||
const siblings = readDirectory(directoryPath);
|
||||
|
||||
const indexCode = createIndexCode(siblings);
|
||||
const indexCode = createIndexCode(siblings, {
|
||||
banner: options.banner
|
||||
});
|
||||
|
||||
const indexFilePath = path.resolve(directoryPath, 'index.js');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user