Skip to content
This repository has been archived by the owner on Dec 29, 2017. It is now read-only.

Use export import and .d.ts rewriting to consolidate module exports #21

Open
JoshuaKGoldberg opened this issue May 21, 2016 · 1 comment

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented May 21, 2016

Don't have things like...

import { IPreThing } from "IPreThing";
import { IMapsCreatrSettings } from "IMapsCreatr";

Instead:

  1. Use export import in the main "MapsCreatr" module so consumers will just import from there:

    import { IPreThing, IMapsCreatrSettings } from "MapsCreatr";
  2. Rewrite output .js and .d.ts files to not include require modules that have nothing in them. This way there isn't even an "IPreThing" distributed.

As a side bonus, the .d.ts files should have their type /// <reference path="..." />s rewritten to match the typings style.

@JoshuaKGoldberg
Copy link
Member Author

JoshuaKGoldberg commented May 21, 2016

Thought: it might be possible to rewrite files into the traditional namespace { ... } equivalents based on their folder structure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant