New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textlint: index.ts export as es module #337

Closed
azu opened this Issue Nov 26, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@azu
Member

azu commented Nov 26, 2017

#332 index.ts is commons js module.
We change this to export { TextlintCore } from "...." es module.

Before

Export as common js module.

module.exports = {
  textlint,
  TextLintEngine,
}

After

Export as named module.

export { 
  textlint,
  TextLintEngine
}

You can import it as named import.

import { textlint } from "textlint"

or

You can import it as common js module

const textlint = require("textlint").textlint
@azu

This comment has been minimized.

Show comment
Hide comment
@azu

azu Nov 26, 2017

Member

This help typescript user to use textlint.

Member

azu commented Nov 26, 2017

This help typescript user to use textlint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment