Skip to content

Commit

Permalink
chore: put typings in dist directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Mar 15, 2021
1 parent ec0d5c9 commit 256168a
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 216 deletions.
210 changes: 0 additions & 210 deletions index.d.ts

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "2.3.0",
"description": "Rollup plugin to add license banner to the final bundle and output third party licenses",
"main": "dist/index.js",
"types": "index.d.ts",
"types": "dist/index.d.ts",
"typings": "dist/index.d.ts",
"scripts": {
"lint": "gulp lint",
"clean": "gulp clean",
Expand Down
24 changes: 19 additions & 5 deletions scripts/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,27 @@
* SOFTWARE.
*/

const path = require('path');
const gulp = require('gulp');
const rollup = require('rollup');
const config = require('./rollup.config');
const rollupConfig = require('./rollup.config');
const config = require('../config');

module.exports = function build() {
return rollup.rollup(config).then((bundle) => (
Promise.all(config.output.map((output) => (
module.exports = gulp.series(
buildOutput,
copyTypings
);

// eslint-disable-next-line require-jsdoc
function buildOutput() {
return rollup.rollup(rollupConfig).then((bundle) => (
Promise.all(rollupConfig.output.map((output) => (
bundle.write(output)
)))
));
};
}

// eslint-disable-next-line require-jsdoc
function copyTypings() {
return gulp.src(path.join(config.src, 'index.d.ts')).pipe(gulp.dest(config.dist));
}
Loading

0 comments on commit 256168a

Please sign in to comment.