Skip to content

Commit

Permalink
Fix entry ts definition
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Mar 20, 2019
1 parent de2026f commit 7b1a410
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pack.js
Expand Up @@ -75,14 +75,21 @@ async function genIndex() {
for (const type of ['browser', 'node']) {
const modNames = mods[type];
let data = '';
let tsData = '';
each(modNames, name => {
data += `exports.${name} = require('./${name}');\n`;
tsData += `export import ${name} = require('./${name}');\n`;
});
await fs.writeFile(
path.resolve(`packages/licia/${type}.js`),
data,
'utf8'
);
await fs.writeFile(
path.resolve(`packages/licia/${type}.d.ts`),
tsData,
'utf8'
);
}
}

Expand Down

0 comments on commit 7b1a410

Please sign in to comment.