问题标签 [browserify]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 是否可以从浏览器创建到 redis 服务器的连接?
是否可以从浏览器创建到 redis 服务器的连接?您可以使用var client = net.connect(port, host);
. 我想知道是否有办法在浏览器中使用 Browserify 或本地方式连接到服务器?
谢谢!
javascript - 浏览器中节点的 net.connect() ?
我想知道是否可以在浏览器中使用这个 node.js TCP 抽象?我现在正在研究 Browserify,但可能已经存在一些东西,感谢您的帮助!
unit-testing - 如何使用 jasmine 和 browserify 进行单元测试?
使用 browserify 样式代码运行 jasmine HTML 报告器的任何最佳方法?我还希望能够使用 phantomjs 无头运行,因此需要 HTML 报告器。
jquery - 将 jquery 与 browserify 一起使用
我正在尝试通过模块 jquery-browserify 将 jQuery 与 browserify 一起使用。我在我的 client.js 脚本中需要该模块:
当我运行我的节点服务器时,在我运行 browserify 之后,我收到“未定义窗口”错误。我究竟做错了什么?
coffeescript - npm 包品牌
我用 CoffeeScript 编写了一个库。
它通过 Knockout 视图模型将 Backbone 视图与 Backbone 集合和模型联系起来。它有助于轻松开发管理 Web 界面,我已经在我的项目中使用了它。现在是开源这个包的时候了,但我坚持名字。当前名称 - “bbko”来自 BackBone + KnockOut,但听起来不太好,不是吗?
我不是以英语为母语的人,因此非常感谢您的帮助。
PS 我知道,已经有一个很好的替代库 - KnockBack。这不是我写的)))
node.js - Browserify/Jadeify:不再支持需要地图
我正在尝试在我的 ExpressJS 项目中使用browserify / jadeify :
server.coffee
main.coffee
(客户端)
我得到的是:
似乎服务器不想启动。我怎样才能让它工作?我认为代码与文档中的代码基本相同。出了什么问题,我该如何解决?
browser - Managing multiple NPM modules browser-side
Okay, I've looked and looked and don't quite see a question that looks like mine, nor a project that quite addresses my need. This is probably because I'm doing something insane, and I am also asking for something difficult. But I wanted to see what others think.
I'm building my first large-scale single-page application. The way I've set it up is by breaking it up into a number of NPM modules. I like this because NPM provides a nice environment to build purely node-run unit tests in, a way to reuse some of my code for other projects we do at my company, and a forced separation of concerns. Here's the general idea:
- A core data model library
- A core UI library
- A psuedo-library that provides individual UI components based on the above two…</li>
- …another of those…</li>
- …etc for each sub-application of my application
- A very small central project that pulls all the components provided by the above together into an interface as necessary
This means a lot of libraries, and a number of dependencies that are common (Underscore, moment, EventEmitter2, etc).
Now I need to figure out how to get all that code into a browser. Ideally, I'd want something with some browserify characteristics (rolls modules and dependencies together into single files to cut down on resource callbacks), but has some of requirejs's asynchronous loading DNA (I'd rather not have to load my entire application up front; being able to call down chunks when the user navigates is useful).
I'm having trouble reconciling the above, though. I get what Require is trying to do, but every time I try to use it for already-built NPM modules (not AMD modules, though I'm happy to write that central project in an AMD-ish way) I get really confused and the sense that it's not really meant for me. For a single page application it seems like it's just going to resolve everything into one file anyway, since my dynamic resources are whole dependencies rather than individual files? And of course, Browserify is made with the sole intent of Hulk Smashing all your code into a single file. I could bundle each NPM module separately with Browserify, but then I'm duplicating the common dependencies for each.
I've looked at a bunch of other projects and they all seem to be addressing the client side more than the bundling side. What am I missing here?
[In pipe dream mode, I also like inject, partly because it's written by LinkedIn (who have a good reputation in my mind), but also for its localStorage caching.]
node.js - Node-browserify 没有产生任何输出
我使用 全局安装了 node-browserify npm install browserify -g
,但该模块没有按预期工作。安装后,我尝试browserify entry.js -o entryBrowserfied.js
在与 相同的文件夹中 运行该命令entry.js
,但该命令不会在与 entry.js 相同的目录中生成 JavaScript 文件,也不会产生任何控制台输出。既然这个命令似乎不起作用,我如何从 commonJS 模块生成“浏览过的”模块?
完整的控制台输出(使用我输入的命令)如下所示:
我仍然不确定为什么这个命令没有按照文档中的描述从 entry.js 生成文件。
node.js - 找不到模块“浏览器”
我收到此错误:
错误:找不到模块“浏览器”
当我将此行添加到我的 app/server.js 文件时:
现在我对 Node 还是很陌生,但我认为我正确安装了它,通过
根据他们的文档。
我很确定这是检查我的全局模块的命令:
它在那里列出了browserify。那我为什么不能require
呢?