[英]How do I convert the following GitHub project into a deployable .js file?
I am a total newbie when it comes to GitHub and Javascript.在 GitHub 和 Javascript 方面,我完全是新手。 I have spent an hour playing around with Git Bash, but I seem no closer to actually achieving what I expect is a very simple task.
我花了一个小时玩 Git Bash,但我似乎离真正实现我期望的非常简单的任务还差得远。
Quite simply - how do I compile the following Javascript project?很简单 - 我如何编译以下 Javascript 项目?
The following repo contains all the source code for a project.以下 repo 包含项目的所有源代码。 I understand that to deploy it everything has to be combined into two.js files.
我知道要部署它,所有东西都必须合并到 two.js 文件中。
https://github.com/kevinchappell/formBuilder https://github.com/kevinchappell/formBuilder
But how do you compile?但是你如何编译?
If you look at the package.json
file, you'll see that it has a couple of build scripts including just build
which seems to combine all of them.如果您查看
package.json
文件,您会发现它有几个build
脚本,包括似乎结合了所有这些的构建脚本。
To build it, you need to have Node.js installed.要构建它,您需要安装 Node.js。 From then on, after cloning the project locally, you'd need to do
npm install
(from inside the project's dir) and then npm run build
which will do the build itself and output the files needed to ./dist
.从那时起,在本地克隆项目后,您需要执行
npm install
(从项目的目录内部),然后npm run build
,这将执行构建本身和./dist
所需的文件。
Can you just use the CDN: https://formbuilder.online/docs/getting-started/ ?您可以只使用 CDN: https://formbuilder.online/docs/getting-started/吗?
Are you attempting to build it locally?您是否尝试在本地构建它?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.