twitter-bootstrap 如何使用yarn安装bootstrap 4 - libsass库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40474686/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 00:23:32  来源:igfitidea点击:

How to use yarn to install bootstrap 4 - libsass libraries

twitter-bootstraplibsassyarnpkg

提问by dragonfly

I'm trying to use yarn for my latest project. How to install bootstrap 4 - libsass libraries using yarn

我正在尝试将纱线用于我的最新项目。如何使用纱线安装引导程序 4 - libsass 库

回答by TORN

Attention:

注意力:

I just realized a difference between the installations with npm installand yarn.

我刚刚意识到使用npm install和安装之间的区别yarn

Here are the two commands I used:

这是我使用的两个命令:

yarn add [email protected] --dev
npm install [email protected] --save-dev

The correct/current version of bootstrap 4.0.0-alpha.6 contains this file:

引导程序 4.0.0-alpha.6 的正确/当前版本包含此文件:

/node_modules/bootstrap/scss/_tags.scss

Installed with npm, this file exists as expected. But installed via yarn, this file is missing. Even if changing bootstrap@^4.0.0-alpha.6to [email protected]in package.jsondidn't fix this issue.

与 npm 一起安装,此文件按预期存在。但是通过yarn安装,这个文件丢失了。即使更改bootstrap@^4.0.0-alpha.6[email protected]inpackage.json也不能解决此问题。

回答by dragonfly

Just run:

赶紧跑:

yarn add [email protected]
yarn add gulp-sass --save-dev

回答by Shafique Jamal

To find the most current installation instructions, see github repo:

要查找最新的安装说明,请参阅 github 存储库:

https://github.com/twbs/bootstrap

https://github.com/twbs/bootstrap

As of the time of this posting, instructions for installing the latest beta version of Bootstrap v4 via yarn is:

截至本文发布时,通过 yarn 安装最新测试版 Bootstrap v4 的说明为:

yarn add [email protected]

回答by Sam

yarn add bootstrap@4

installs the latest bootstrap 4 version (4.4.1 at the time)

安装最新的 bootstrap 4 版本(当时是 4.4.1)



And you can always use

你可以随时使用

yarn add your_package@^

To view all the versions that are available

查看所有可用版本

回答by Pierre R-A

Bootstrap 4 is now in beta, so you can do the following:

Bootstrap 4 现在处于测试阶段,因此您可以执行以下操作:

yarn add [email protected]

回答by Manu

yarn add [email protected] jquery popper.js

纱线添加 [email protected] jquery popper.js

all guideline there https://www.mashrurhossain.com/blog/rails6bootstrap4

那里的所有指南https://www.mashurhossain.com/blog/rails6bootstrap4