Take following into account
- Regex is very simple, so if these lines are found inside comments, files gets reexportes just the same. Do not comment out your code. Never. Regardless of.
- Inside string lines as well, so pay attention.
- Automatically deletes index files if no exports present within folder
- If anything other than reexport is found in index.ts, including comments and empty semicolons, file is considered off-limits, i.e. user managed.
const gulp = require('gulp');
const generator = require('typescript-reexport-generator')
const options = { lineFeed: '\r\n' };
gulp.task('generate-reexports', function (done) {
generator.generateReexports('./src', options)
.then(done);
});