Tsdx: Document migration to tsdx from microbundle

Created on 28 Aug 2019  路  3Comments  路  Source: formium/tsdx

Current Behavior

All the current documentation is about bootstrapping a new project to use tsdx. There is nothing about how to add the tsdx toolchain to an existing project.

Desired Behavior

With the comparisons to microbundle, it'd be good to have documentation on how to migrate a project to use tsdx instead. If you want to avoid the appearance of competition/comparisons, etc. the documentation could be generalized to be a generic migration strategy.

Suggested Solution

I'd like to see the minimum set of dependencies to add, and a list of some of the dependencies that could be removed. Eg, does eslint/tslint make sense to be an explicit dependency with tsdx? Are the dependencies different for react projects vs pure JS packages?

Who does this impact? Who is this for?

People using microbundle that are interested in the additional features of tsdx that are not available in microbundle, or people using custom rollup configs that want to simplify their setup.

Describe alternatives you've considered

I'm already using microbundle on a number of projects in a monorepo. It's cost prohibitive to re-create all these packages using the tsdx create CLI and then manually copy files over.

Additional context

Thanks for considering!

help wanted docs

Most helpful comment

From looking at https://github.com/natemoo-re/tsdx-monorepo/blob/master/package.json, it looks like the only deps for a non-monorepo are these devDependencies:

"@types/jest": "^24.0.13",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"tsdx": "^0.6.0",
"tslib": "^1.9.3",
"typescript": "^3.5.1"

Thus, the items to install would be:

yarn add --dev @types/jest @types/react @types/react-dom react react-dom tsdx tslib typescript

Are any of these bundled into tsdx and can be removed?

All 3 comments

Great idea

be my guest @NateRadebaugh :)

From looking at https://github.com/natemoo-re/tsdx-monorepo/blob/master/package.json, it looks like the only deps for a non-monorepo are these devDependencies:

"@types/jest": "^24.0.13",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"tsdx": "^0.6.0",
"tslib": "^1.9.3",
"typescript": "^3.5.1"

Thus, the items to install would be:

yarn add --dev @types/jest @types/react @types/react-dom react react-dom tsdx tslib typescript

Are any of these bundled into tsdx and can be removed?

Was this page helpful?
0 / 5 - 0 ratings