jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.26k stars 508 forks source link

`react-with-storybook` template installs ~1000 direct dependencies #769

Closed swyxio closed 4 years ago

swyxio commented 4 years ago

hi folks, coming back to tsdx after a long absence :)

Current Behavior

when i do npx tsdx create mylib and pick the react-storybook template, the resulting project installs every single transitive dependency as a dependency of the scaffolded project. i'm preettty sure this is wrong

Expected behavior

a much cleaner package.json

Suggested solution(s)

i'm not sure what causes this yet, but i'm pretty sure this is unintentional...

Your environment

Software Version(s)
TSDX 0.13.2
TypeScript 3.9
npm/Yarn npm 6.14
Node 12.18
Operating System macos
jaredpalmer commented 4 years ago

Hrmmmmmm. This is weird. Can we ping someone from storybook?

swyxio commented 4 years ago

tbh I have grown to dislike how bloated Storybook has become. maybe the solution is to (gasp) build our own or adopt a lighter alternative.

jaredpalmer commented 4 years ago

I’m not a huge storybook fan. I have plans for a lower level suite that’s more deeply integrated into TS, can share the notion doc GitHub notifications@github.com wrote: “tbh I have grown to dislike how bloated Storybook has become. maybe the solution is to (gasp) build our own or adopt a lighter alternative.”

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

agilgur5 commented 4 years ago

I was unable to reproduce this:

Repro logs: ```bash $ npx tsdx create mylib ::::::::::: :::::::: ::::::::: ::: ::: :+: :+: :+: :+: :+: :+: :+: +:+ +:+ +:+ +:+ +:+ +:+ +#+ +#++:++#++ +#+ +:+ +#++:+ +#+ +#+ +#+ +#+ +#+ +#+ #+# #+# #+# #+# #+# #+# #+# ### ######## ######### ### ### ✔ Choose a template · react-with-storybook ✔ Created mylib ✔ Installed dependencies Awesome! You're now ready to start coding. I already ran yarn install for you, so your next steps are: cd mylib To start developing (rebuilds on changes): yarn start To build for production: yarn build To test your library with Jest: yarn test Questions? Feedback? Please let me know! https://github.com/jaredpalmer/tsdx/issues $ cd mylib/ $ cat package.json { "version": "0.1.0", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", "files": [ "dist", "src" ], "engines": { "node": ">=10" }, "scripts": { "start": "tsdx watch", "build": "tsdx build", "test": "tsdx test --passWithNoTests", "lint": "tsdx lint", "prepare": "tsdx build", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook" }, "peerDependencies": { "react": ">=16" }, "husky": { "hooks": { "pre-commit": "tsdx lint" } }, "prettier": { "printWidth": 80, "semi": true, "singleQuote": true, "trailingComma": "es5" }, "name": "mylib", "author": "Anton Gilgur", "module": "dist/mylib.esm.js", "devDependencies": { "@babel/core": "^7.10.5", "@storybook/addon-actions": "^5.3.19", "@storybook/addon-docs": "^5.3.19", "@storybook/addon-info": "^5.3.19", "@storybook/addon-links": "^5.3.19", "@storybook/addons": "^5.3.19", "@storybook/react": "^5.3.19", "@types/react": "^16.9.43", "@types/react-dom": "^16.9.8", "babel-loader": "^8.1.0", "husky": "^4.2.5", "react": "^16.13.1", "react-docgen-typescript-loader": "^3.7.2", "react-dom": "^16.13.1", "react-is": "^16.13.1", "ts-loader": "^8.0.1", "tsdx": "^0.13.2", "tslib": "^2.0.0", "typescript": "^3.9.7" } } ```

The install code is quite simple, so I wouldn't suspect a bug coming from here.

swyxio commented 4 years ago

hmm @agilgur5 i just tried it on my personal machine and got what you got. very strange. this could be a weird bug on my work machine. i will close for now until i can repro.