javascript - Confused about Node, NPM, Bower, and using it for Bootstrap - Stack Overflow

I'm trying to learn the latest technologies for web development. I already know HTML, JS, CSS, and

I'm trying to learn the latest technologies for web development. I already know HTML, JS, CSS, and server side programming. But I don't understand where Nodejs, npm, and Bower e in.

I want to create a new project. So I created a folder for it. Then I wanted to use bootstrap. So I ran bower install bootstrap. Now I have bootstrap installed in a folder called bower_ponents. Does this mean, if I want to import Bootstrap, I have to add it like this?:

<link href="bower_ponents/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

Or am I missing something. I honestly don't know where to start with these package managers.

I'm trying to learn the latest technologies for web development. I already know HTML, JS, CSS, and server side programming. But I don't understand where Nodejs, npm, and Bower e in.

I want to create a new project. So I created a folder for it. Then I wanted to use bootstrap. So I ran bower install bootstrap. Now I have bootstrap installed in a folder called bower_ponents. Does this mean, if I want to import Bootstrap, I have to add it like this?:

<link href="bower_ponents/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

Or am I missing something. I honestly don't know where to start with these package managers.

Share Improve this question edited Jun 29, 2015 at 16:07 Siguza 23.9k6 gold badges55 silver badges98 bronze badges asked Mar 14, 2015 at 5:16 AskYousAskYous 4,7409 gold badges53 silver badges91 bronze badges 2
  • Now your next step is to learn to use gulp.js and to make gulp do all your build steps. That would include copying over bootstrap/dist/css/bootstrap.min.css and all the other css into, say, public/css, and do all the JS and CSS minification and concatenation and make your public/ folder contain something like 6 files (out of 150 that you work with in the project) which you would use for production deployment :) – Zlatko Commented Mar 15, 2015 at 8:56
  • @Zlatko Interesting... Thanks! – AskYous Commented Mar 15, 2015 at 8:57
Add a ment  | 

1 Answer 1

Reset to default 19

bower - for installing client-side libraries/ modules( e.g: jquery, bootstrap, angular etc.), module details generally put in bower.json of project root folder

npm - for installing server-side modules (express, crypto, socket.io, etc.), module details generally put in package.json of project root folder.

In general, the things you install using npm get stored in the folder node_modules and bower puts it in bower_ponents,

I am assuming you are using express module on node.js server. When you add a line like:

app.use(express.static(__dirname+ '/bower_ponents'));

Now your HTML files, can use the bower ponents as

<link href="bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

Another option is to edit .bowerrc and specify where the downloaded bower modules must be put...

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1740085087a4188726.html

相关推荐

  • Windows下的python安装教程_2024年10月最新最详细的安装指南

    文章目录 前言一、下载python二、安装python三、验证环境四、配置环境变量&#xff08;可选&#xff09;总结 前言 Python 是一种广泛使用的高级编程语言&#xff0c;以其简洁易读的语法和强大的

    1小时前
    00
  • MCP实战

    前言最近热衷于找一些好玩的MCP,集成在cursor中,给大模型外挂许多有趣的功能,例如:什么是MCP?本地如何开发MCP ServerMCP实战 | cursor 如何一句话操作 gitHub 代码库cursor 如何调用 MCP ser

    1小时前
    00
  • 方法分享

    作者,Evil Genius现在的日子,关税在涨,物价在涨,钱是越来越难挣了。什么东西在跌呢?工资在跌,房价也跌,房租反而涨了,生活的压力感觉越来越大了。对于生信分析而言,什么东西是最重要的?尤其是空间转录组的分析?很显然,硬件是服务器,软

    1小时前
    00
  • win 7系统怎么看计算机配置,windows7系统怎么查看电脑配置

    通常我们在选购电脑的时候都比较注重电脑配置&#xff0c;那么windows7系统怎么查看电脑配置呢?接下来大家跟着学习啦小编一起来了解一下windows7查看电脑配置的解决方法吧。 windows7查看电脑配置方法一&#x

    1小时前
    00
  • Elasticsearch BBQ与OpenSearch FAISS:向量搜索性能对比

    基于二进制量化的向量搜索:Elasticsearch使用BBQ技术比OpenSearch搭配FAISS快5倍。我们收到社区要求,希望能解释Elasticsearch与OpenSearch在语义搜索向量搜索方面的性能差异。因此,我们进行了一

    57分钟前
    00
  • DeepSeek辅助Power BI自定义Vega条形图

    Power BI Deneb这个视觉对象支持Vega自定义图表。网上有丰富的Vega代码资源,参考《Power BI Deneb图表资源库》,EasyShu提供了Excel版本的Vega图表库,Power BI也可以借鉴。使用Vega并不意

    54分钟前
    00
  • 完美解决win7系统使用wireshark未响应问题

    Win7系统&#xff0c;安装wireshark4.0的版本&#xff0c;发现打开可以打开&#xff0c;但是只要点击网卡之后就会显示无响应 一开始我以为是位数的原因&#xff0c;之前用的64位的&am

    54分钟前
    00
  • 8.6K star!完全免费+本地运行+无需GPU,这款AI搜索聚合神器绝了!

    嗨,大家好,我是小华同学,关注我们获得“最新、最全、最优质”开源项目和高效工作学习方法 FreeAskInternet是一款革命性的开源项目,它完美结合了多引擎搜索和智能语言模型,让你在不联网、不花钱、不暴露隐私的情况下,获得媲美ChatG

    51分钟前
    00
  • 苹果电脑装win7系统问题

    安装中问题&#xff1a; Windows 未能启动。原因可能是最近更改了硬件或软件。解决此问题的步骤&#xff1a; 1. 插入Windows 安装光盘并重新启动计算机。 2. 选择语言设置&#xff0c;然后单击

    49分钟前
    00
  • 扣子空间能战否?我看行~

    最近扣子推出了新模块:扣子空间,功能和前段时间刷屏的Manus类似,就是帮你一步到位完成任务。扣子空间地址:扣子空间现在还没完全开放,需要有邀请码,没邀请码的同学先加入等候名单,然后静静等待~这个扣子空间和普通的AI聊天工具有什么不一样呢?

    45分钟前
    00
  • 技术好文|不用背代码!用动画征服算法!

    不用背代码!用动画征服算法!用腾讯云Cloud Studio的 AI助手,让算法“动”起来

    44分钟前
    00
  • lenovo联想拯救者Legion Y9000P 2022款2023款2024款笔记本电脑(82RF,82WK,82WQ,83DE,83DF)原装出厂Windows11预装OEM系统镜像下载

    拯救者Legion Y9000P IAH7H 2022款【82RF】原厂Win11系统包 链接&#xff1a;https:pan.baidus1HYN4eO6eWCkgdP6ZxsjnmA?pwdnqw8  提取码&am

    39分钟前
    00
  • KB2533623补丁安装指南 - 解决Win7下无法运行.NET 67 WinForm应用

    KB2533623补丁安装指南 - 解决Win7下无法运行.NET 67 WinForm应用 项目地址:https:gitcodeopen-source-toolkit62304 概览 对于所有遇到Windows 7系统无法

    36分钟前
    00
  • PostgreSQL无服务 Neon and Aurora 新技术下的新经济模式 (翻译)

    说完新技术下的新经济模式,下面咱们用Amazon Aurora 的Postgres 无服务的介绍来结束此篇文章。(跟上新形势,不做落后的人)原文地址:引言:文章首先提到,将传统关系型数据库(如 MySQL)分解为独立的存储和计算组件,可

    32分钟前
    00
  • OceanBase 单机版可以大批量快速部署吗? YES

    OceanBase的单机版已经开放给一些老师测试了,有幸被邀请进行单机测试,这次可以测试的是商业版,我已经好久没有尝试一个商业版线下的数据库试用了,上一次还是SQL SERVER 2019 的180天版本。测试企业OB版本测试企业OB版本目

    30分钟前
    00
  • R中单细胞RNA

    引言本系列开启 R 中scRNA-seq数据分析教程[1],持续更新,欢迎关注,转发!想要获取更多教程内容或者生信分析服务可以添加文末的学习交流群或客服QQ:941844452。简介RNA 速度分析最早由 La Manno 等人在 2018

    25分钟前
    20
  • 得物增长兑换商城的构架演进

    一、简介在移动互联网蓬勃发展的今天,用户的选择日益多元化,App市场的竞争也愈发白热化。为了在激烈的市场竞争中脱颖而出,提升用户获取效率并增强用户粘性,越来越多的应用开始采用积分兑换、抽奖等互动玩法。这些精心设计的运营策略不仅能够满足用户的

    22分钟前
    20
  • OFC 2025 Google报告:AI时代的光通信挑战

    在OFC会议的数据中心峰会上,谷歌带来了一场深度分享,直指AI和ML时代光通信技术面临的关键问题。报告中,谷歌明确指出可靠性与可用性、功耗、带宽规模三大“潜在砖墙”,并结合实际案例与数据,剖析挑战本质及解决思路 。一、AI时代的

    14分钟前
    00
  • MCE干货分享

    在蛋白功能研究中,亲和力测定是揭示分子互作机制的关键环节。然而,传统方法通常依赖高纯度蛋白,而许多蛋白如膜蛋白、低溶解度蛋白等的研究就受到了限制。微量热泳动技术 (MST) 以其高灵敏度、低样本需求和对粗样品的兼容性,不仅可以检测重组蛋白,

    12分钟前
    00
  • OFC 2025:IBM开发应用于CPO的高密度聚合物波导光子模块

    一、技术背景:突破电互连瓶颈在服务器硬件中,计算单元的带宽每两年以约 3 倍的速度增长,而互连技术仅以 1.4 倍的速度发展,导致 “带宽鸿沟” 持续扩大。传统可插拔收发模块虽能扩展传输距离,但在高密度集成和功耗上存在局限。

    10分钟前
    00

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信