gajus/create-index

How to create index of named exports?

Open

#11 opened on 2016年6月10日

GitHub で見る
 (5 comments) (2 reactions) (0 assignees)JavaScript (87 forks)github user discovery
help wanted

Repository metrics

Stars
 (278 stars)
PR merge metrics
 (PR metrics pending)

説明

I use webpack and babel as my es6 transpiler in my dev.create-index act correct when all siblings are files. It breaks when export subdir.

For example

├── king.js
└── queen
    ├── bar.js
    └── foo.js

create-index can correctly build index.js in dir queen

export bar from './bar.js';
export foo from './foo.js';

but in the root dir ,index.js

export queen from './queen'

just export undefined.

I found that

export * as queen from './queen';

worked.

So I forked your code and change the dir export style and committed.

https://github.com/deadivan/create-index

Please tell me if I doing something wrong.

コントリビューターガイド