Xterm.js: no 'dist' build in releases ?

Created on 8 Jan 2018  路  20Comments  路  Source: xtermjs/xterm.js

up to 2.9.2 the release tags included a 'dist' directory with the built package, ready for consumption

since 3.0.0 there is no 'dist' directory anymore, is this by design or accident?

self building would be very hard for us (proxmox) since on debian (which we use as base) neither npm nor gulp is packaged, and it would mean we would rely on non-debian repos for this (or a not very nice build-workflow)

edit:

afaics, the dist/ is in the .gitignore (from the v3 branch) with a comment that this can be removed when merging v3 into master, but this did not happen, so i hope this was just a mistake

Most helpful comment

OK, this was not by any means intentional 馃槄 . Will take a look.

All 20 comments

It's probably a good idea to keep shipping this, but we should still keep it in the .gitignore. Thoughts @parisk?

In the meantime, is there a way to build the dist/ directory as before? build/ doesn鈥檛 include AMD loaders, which we use extensively in our application.

Looks like the build task might have been removed to build dist. To use xterm.js do you install it from npm and then link to the files in node_modules/xterm/dist/ from html?

Previously we just packaged up dist/ into an RPM.

FWIW @cancan101 has found a way for us to continue pulling in xterm using bower in Jupyter Notebook: https://github.com/jupyter/notebook/pull/3189

@Tyriar we use the git as a submodule for our own package and use the dist directory direclty in our build
as we cannot really use npm (see my comment about debian)

OK, this was not by any means intentional 馃槄 . Will take a look.

@parisk I was looking at the old issues as the decisions are a little hazzy for me and the plan was to continue shipping dist/ after removing bower support. Just got lost in the noise of the webpack build I guess.

@Tyriar you are right. I am trying to understand why this happened at all tbh. Seems like dist files are supposed to be included in the released, based on package.json on release/3.0:

https://github.com/xtermjs/xterm.js/blob/45ed27d329f625daf44513f112d5a2e1aa1e0ca8/package.json#L19-L22

Perhaps the issue is the git release not containing the dist files, as in they used to be checked in to the repo?

@parisk from my local test the dist files are included when installing from npm.

@blink1073 @parisk @Tyriar just for clarity: i do not talk about npm releases (as i already explained we cannot use npm) but about the release tags in git (as we use this for our packaging)

afaics, during the development of the v3 branch, the dist directory was included in the .gitignore, so that
building there does not pollute the git repository with a comment that this can be removed when merging. a possible solution would be to manually add those files in the release script and leave it in the gitignore

edit: after reading #406 , it seems that this was the plan all along, so sorry for the confusion, but is there really no other way to get the released dist files other than npm? the issue talks about build artifacts, but it seems it is not available this way either.

Yep, I was trying to say that right now 馃槄 , thanks @blink1073! The dist directory is being included in the npm release appropriately.

@flumm the suggested way to install xterm.js is via npm or yarn: https://xtermjs.org/docs/guides/download/.

Shipping the dist directory in the Git repository has turned out to be cumbersome and error prones (accidental commits etc), so we stopped doing so.

If you insist installing xterm via Git, I suggest you write a wrapper script to also perform the build for you, after pulling the latest changes.

@parisk is it really not possible to include the dist as a build artifact on git like you described in #406 ? if not, that means that for the foreseeable future we will not be able to update to a newer xtermjs release than 2.9.2 since neither npm nor yarn is available on debian 9 (adding external repositories in the build step is no really feasible for us).

@flumm, why not pull the package from npmjs.org instead of github?

$ npm view xterm dist.tarball
https://registry.npmjs.org/xterm/-/xterm-3.0.1.tgz

@flumm no, we do not have any intentions to maintain distribution files in the repository, as we believe it's a bad practice.

You can find more information about this decision on the initial issue and PR:

@blink1073 yes that seems to work :) thanks

@parisk yeah, in general i agree with you, but sadly with npm in combination with debian it is not easy to integrate stuff where the you can only build with npm/yarn/etc.
i simply missed the whole issue because i integrated xterm.js in proxmox well after those decisions were made

@flumm I see your use case. You can give a try at Docker for your needs (if it's applicable to you). You can use the node image to build your project.

Or you can just use the npm tarballs 馃槃.

All the best!

What about just using nvm to install npm?

Feel free to use bower install --save xterm.js-next. It's my fork created for personal use, but I try to keep it updated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

albinekb picture albinekb  路  4Comments

pfitzseb picture pfitzseb  路  3Comments

circuitry2 picture circuitry2  路  4Comments

Tyriar picture Tyriar  路  4Comments

fabiospampinato picture fabiospampinato  路  4Comments