用于 javascript 客户端代码的 npm [英] npm for javascript client side code

查看:52
本文介绍了用于 javascript 客户端代码的 npm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读有关 npm 开发人员指南的文档.
我想知道是否可以使用 javascript/css/html 编写 Web 客户端应用程序通过使用 npm?
如果是的话,github上有没有一些例子?

I was reading a document about npm Developer Guide.
I was wondering if it is possible to write a web client application using javascript/css/html by using npm?
If yes, are there some example on github?

例如,我的客户端 Web 应用程序依赖于 requirejs、jquery、下划线和主干.
我可以使用npm自动下载最新版本的requirejs、jquery、underscore和backbone到vendor目录下吗?
如果没有,是否还有其他工具/方法可以实现这一目标?

For example my client web application depends on requirejs, jquery, underscore and backbone.
Can I use npm to automatically download, in the vendor directory, the latest version of requirejs, jquery, underscore and backbone ?
If not, are there other tools/methods to accomplish this goal?

推荐答案

Yeoman 使用名为 Bower 管理依赖项 - Bower Github 页面提供了一个为项目下载 jQuery 的示例,因此这可能对您的项目有用.

Yeoman uses a package manager called Bower to manage dependencies - the Bower Github page gives an example of downloading jQuery for a project, so this might be useful for your projects.

这篇关于用于 javascript 客户端代码的 npm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆