javascript - npm init 中的 "entry point"是什么

标签 javascript node.js npm

我有一个空的新项目,当我运行 npm init 时,我得到了一个要回答的问题列表,例如:

name: (karma)
version: (1.0.0)
description:my project description
entry point: (index.js)

我真的很困惑说“入口点”,这是我的 index.html 文件还是我的 app.js 还是其他什么?

最佳答案

引自 blog post :

Entry point is the javascript file that will be invoked when consumers of your module “require” it, this file will include the main logic for your module, or if it is a large module you can export public functions found with other files (typically in the lib directory)

所以它应该是你的 app.js 文件。

关于javascript - npm init 中的 "entry point"是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32800066/

相关文章:

javascript - 表 ng-repeat 中的 dir-pagination angularjs - 在更改页面时,首先所有行都会出现片刻

javascript - 对 h1、h2 标题、重置计数器的嵌套文档进行编号

javascript - 数组中的补丁组动画出错

javascript - node-mysql2 Final block 和connection.end()不想被调用

node.js - NodeJs 如何使用 Sequelize?

node.js - 如何在 Node Js 中将 A-lib 与 fastify 一起使用

npm - 如何在 npm 中安装最新版本的 SNAPSHOT?

javascript - 显示下载量 HTML

node.js - 当我输入 'npm start' 将我的网站与本地主机连接时出现错误

javascript - 有没有办法可以在后台从 cmd 行模拟 grunt 文件观察器?