gajus/create-index

How to create index of named exports?

Ouverte

#11 ouverte le 10 juin 2016

 (5 commentaires) (2 réactions) (0 personne assignée)JavaScript (86 forks)github user discovery
help wanted

Métriques du dépôt

Stars
 (278 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur