Skip to content
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

Fix module build, add TS declaration files, fix search addon #868

Merged
merged 3 commits into from
Aug 8, 2017

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Aug 8, 2017

This introduces a breaking change to importing the project, the README file has been updated to reflect this. It's now exporting an ES6-style module which can be imported without the use of require. This was done because I couldn't get the build to work without making this change and because it's moving towards the future. You can still require using regular JavaScript, but there's a Terminal object on the default export.

src/xterm.ts still lives on but it is only the entrypoint for browserify now. This is mentioned in the header.

Fixes #865
Fixes #866
Fixes #867


Verified core lib and search addon works in demo on Chrome.

Verified core lib and search addon in VS Code:

// Old (legacy import):
import Terminal = require('xterm');

// New:
import { Terminal } from 'xterm';

Verified TS Server picks up declarations/typings using a simple TS file:

image

Tyriar added 3 commits August 7, 2017 23:48
CommonJS now imports the Terminal object directly as the trick in xterm.ts
wasn't working properly.

Fixes xtermjs#865
@Tyriar Tyriar added the breaking-change Breaks API and requires a major version bump label Aug 8, 2017
@Tyriar Tyriar added this to the 3.0.0 milestone Aug 8, 2017
@Tyriar Tyriar self-assigned this Aug 8, 2017
@Tyriar Tyriar requested a review from parisk August 8, 2017 07:50
@coveralls
Copy link

coveralls commented Aug 8, 2017

Coverage Status

Coverage decreased (-0.02%) to 71.465% when pulling f21d5f2 on Tyriar:865_fix_module_build into acefa1a on sourcelair:v3.

Copy link
Contributor

@parisk parisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the docs.

@Tyriar Tyriar merged commit 91bf319 into xtermjs:v3 Aug 8, 2017
@Tyriar Tyriar deleted the 865_fix_module_build branch August 8, 2017 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaks API and requires a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants