semantic-ui - Use Semantic UI with Lerna and yarn workspaces
问题描述
The Semantic UI (and Fomantic UI) installer (famously?) doesn't support yarn because of its interactive postinstall script. Even with "autoInstall": true
in semantic.json
, yarn will still break on the first install.
This makes it hard to keep a themed Semantic UI installation in its own package in a Lerna monorepo, when using workspaces. Even if --ignore-scripts
is added to Lerna's package.json
scripts, it will still run a standard yarn install
by itself every now and then when making changes, and become blocked by Semantic UI.
Is there a way around this?
解决方案
事实上,你可以autoInstall
使用 fomantic-ui 来使用 yarn,我只是运行了这些命令,它就成功了
$ yarn add fomantic-ui --ignore-scripts
$ yarn --cwd node_modules/fomantic-ui run install
语义.json
- "autoInstall": false,
+ "autoInstall": true,
现在每次yarn install
运行它都会“跳过”安装脚本。
确保您使用的是最新版本的 FUI
FUI repo https://github.com/fomantic/Fomantic-UI/issues/386上还有一个关于这个问题的完整问题
推荐阅读
- flutter - 在类中使用另一个提供程序,它在颤动中扩展了 ChangeNotifier
- java - 在后台进程中使用java运行node js文件
- python - 为什么在以下使用排序时会出现不同的结果
- python - 从 Poppler 导入版本时 DLL 加载失败
- c++ - 是否有充分的理由在新代码中使用“extern”链接说明符?
- javascript - 尝试使用节点 js 更新 mongodb 中的单个条目
- sharepoint - 如何在 Hub 站点 Sharepoint Online 的西装栏导航中更改站点名称
- reactjs - React - toggleClass on button 激活所有按钮
- google-analytics - 使用 Google Analytics 时,您是否必须为您的网站编制索引?
- javascript - 如何在 moment.js 中更改语言环境