bencoveney / barrelsby

Automatic TypeScript barrels (index.ts files) for your entire code base

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with `-s filesystem`

Azbesciak opened this issue · comments

Describe the bug
Hi, first of all - nice idea, good project.
However, I have a small issue. My project is quite nested (complex angular app).
I used a barrels on it with the following command:

barrelsby --delete -d ./libs/imap -s filesystem -l all -e .*\.spec\.ts

and it produced files like the one below

import * as groupedtollsindexts from "./grouped-tolls/index";
import * as modulets from "./module";
import * as pipesindexts from "./pipes/index";
import * as routetollmapsideactionts from "./route-toll-map-side.action";
import * as tollcategorizerts from "./toll-categorizer";
import * as tollcostselectindexts from "./toll-cost-select/index";
import * as tolldetailwrapperindexts from "./toll-detail-wrapper/index";
import * as tolldetailindexts from "./toll-detail/index";
import * as tolldetailscomponentts from "./toll-details.component";
import * as tolldetailsmanagerts from "./toll-details.manager";
import * as tolldetailsmodulets from "./toll-details.module";
import * as tolldisplayerts from "./toll-displayer";
import * as tollupdateservicets from "./toll-update.service";
export const grouped-tolls = {
  index: groupedtollsindexts,
};
export {modulets as module};
export const pipes = {
  index: pipesindexts,
};
export {routetollmapsideactionts as route-toll-map-side.action};
export {tollcategorizerts as toll-categorizer};
export const toll-cost-select = {
  index: tollcostselectindexts,
};
export const toll-detail = {
  index: tolldetailindexts,
};
export const toll-detail-wrapper = {
  index: tolldetailwrapperindexts,
};
export {tolldetailscomponentts as toll-details.component};
export {tolldetailsmanagerts as toll-details.manager};
export {tolldetailsmodulets as toll-details.module};
export {tolldisplayerts as toll-displayer};
export {tollupdateservicets as toll-update.service};

As you suspect nearly everything in file is red :/ any advice?
image
image

Environment (please complete the following information):

  • OS: Windows 10.0.19043.2130
  • Node Version 16.14.2
  • Version 2.5.1

Typescript 4.8.4

BTW, wouldn't it be also necessaryy to generate package.json in each directory from where we want to export? Otherwise these structural imports may have not sense - I may be wrong.

commented

@Azbesciak I've personally never gotten that mode to work. I'm marking as a known issue and you should probably use the other option.

No activity has been seen recently, marking as stale. If this is a mistake please reach out to a collaborator

No activity has been seen recently, marking as stale. If this is a mistake please reach out to a collaborator