简体   繁体   English

如何创建我的javascript应用程序包?

[英]How do I create a package of my javascript app?

According my topic, what is the best way to distribute my javascript application? 根据我的主题,分发我的javascript应用程序的最佳方法是什么? Is a best practice distribute my application using npm packages? 最佳做法是使用npm软件包分发我的应用程序吗? Or npm is only for distribute frameworks? 还是npm仅适用于分布式框架?

Thanks! 谢谢! :) :)

If you are building with NodeJS APIs I see no reason why you wouldnt distribute your app with npm. 如果您使用NodeJS API进行构建,那么我看不出为什么不使用npm分发应用程序。 See here for details on packaging and deploying which I found interesting. 有关我发现有趣的打包和部署的详细信息,请参见此处

The standard way to distribute JavaScript modules that were build on Node.js is to publish them onto npm with the command npm publish . 分发基于Node.js构建的JavaScript模块的标准方法是使用命令npm publish将它们发布到npm上。 You can find out how to properly publish modules in the official documentation . 您可以在官方文档中找到如何正确发布模块的方法。

Also read up on package.json . 另请阅读package.json It is basically the interface that you can use for publications. 基本上,它是您可以用于发布的界面。

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

相关问题 如何使用构造函数创建Javascript包? - How do I create a Javascript package with a constructor in it? 如何使用 JavaScript 更改我的待办事项应用程序的顺序? - How do I change the sequence on my To Do app with JavaScript? 如何创建将数据发送到 matlab 的 javascript 应用程序? - How do I create a javascript app that sends data to matlab? 如何根据我的 html 输入创建一个 javascript if 语句? - How do I create a javascript if statement depending on my html input? 如何创建一个运行我的 javascript 函数的按钮? - How do I create a button that runs my javascript function? 如何为我的网页创建 function 以删除 JavaScript 中的项目? - How do I create a function that deletes an item in JavaScript for my webpage? 如何在PhoneGap应用中找到javascript语法错误? - How do I find javascript syntax errors in my PhoneGap app? 如果我的应用中有其他条件语句,我该如何重构这些javascript? - How do I refactor these javascript if else conditional statements in my app? 如何使用 javascript 将我的文件导入应用程序、js? - How do i import my file to app,js using javascript? 如何在 Linux Mint 本地服务我的 javascript 应用程序 - How do I serve my javascript app locally on Linux Mint
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM