Ch3_Bootstrap工作环境配置,同步远程repo

idiosyncrasy: a mode of behavior or way of thought peculiar to an individual.

下载地址

https://getbootstrap.com/

配置

解压这个压缩包,打开解压后的文件,看到里面有个conFusion

拖入终端,执行npm install

配置好.gitignore, 写入文件夹node_modules的名字,让git忽略这个复杂的怪物。

远程仓库同步

git remote add origin https://github.com/LiandaDuanDal/git-booststrap-practice.git

如果远程仓库新增,需要同步到本地,先把远程仓库做成tmep,然后检查差异,和本地仓库的master branch merge一下即可。

(base) ➜  conFusion git:(master) git fetch origin master:temp
From https://github.com/LiandaDuanDal/git-booststrap-practice
 * [new branch]      master     -> temp
(base) ➜  conFusion git:(master) git diff temp
(base) ➜  conFusion git:(master) git merge temp

安装必要的开发包

npm install bootstrap@4.0.0 --save
npm install jquery@3.3.1 popper.js@1.12.9 --save

配置index.html文件

在head标签中加入以下内容:

 <!-- Required meta tags always come first -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">

在body标签的结束位置之前加入script:

 <!-- jQuery first, then Popper.js, then Bootstrap JS. -->
    <script src="node_modules/jquery/dist/jquery.slim.min.js"></script>
    <script src="node_modules/popper.js/dist/umd/popper.min.js"></script>
    <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值