Skip to content

Commit

Permalink
feat: using writeIndex programatically was not respecting passed opti…
Browse files Browse the repository at this point in the history
…ons configuration (#41)

* Create .gitattributes

* pass full options object to createIndexCode in writeIndex
  • Loading branch information
dptoot authored and gajus committed Dec 8, 2017
1 parent bf45925 commit ed8e1d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
2 changes: 1 addition & 1 deletion src/utilities/writeIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ed8e1d0

Please sign in to comment.