1 Commits
Author SHA1 Message Date
James LewisandGajus Kuizinas ed8e1d0699 feat: using writeIndex programatically was not respecting passed options configuration (#41)
* Create .gitattributes

* pass full options object to createIndexCode in writeIndex
2017-12-08 15:15:38 +00:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
* text eol=lf
+1 -1
View File
@@ -17,7 +17,7 @@ export default (directoryPaths, options = {}) => {
const config = readIndexConfig(directoryPath);
const optionsWithConfig = Object.assign({}, options, {config});
const siblings = readDirectory(directoryPath, optionsWithConfig);
const indexCode = createIndexCode(siblings, {config});
const indexCode = createIndexCode(siblings, optionsWithConfig);
const indexFilePath = path.resolve(directoryPath, 'index.js');
fs.writeFileSync(indexFilePath, indexCode);