简体   繁体   English

了解Ender.js

[英]Understanding Ender.js

In my understanding, Ender is a command line tool that helps organize your javascript dependencies. 在我的理解中,Ender是一个命令行工具,可以帮助组织您的javascript依赖项。 We can use ender build underscore qwery to produce a ender.js file which contains the codes of underscore and qwery , then we can include this file in our html. 我们可以使用ender build underscore qwery来生成包含underscoreqwery代码的ender.js文件,然后我们可以在html中包含这个文件。
However, I noticed that ender gets those libs from npm site, so I'm worrying that if all of those libraries could be use in browser side? 但是,我注意到endernpm站点获取了这些库,所以我担心如果所有这些库都可以在浏览器端使用?

Ender.js is a tool for JavaScript dependency management in the browser. Ender.js是浏览器中JavaScript依赖关系管理的工具。

It uses npm for the underlying package management (basically to fetch packages), then compiles all of these fetched packages into a single minified file, that can be used by the browser. 它使用npm进行底层包管理(基本上是获取包),然后将所有这些获取的包编译成一个可以由浏览器使用的缩小文件。

The fact that npm is used does not mean that the packages are (only) for node. 使用npm的事实并不意味着包(仅)用于节点。 Most of them are browser-only, some of them can be used by node and the browser. 它们中的大多数仅是浏览器,其中一些可以由节点和浏览器使用。 Basically, there is nothing to worry about. 基本上,没有什么可担心的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM