简体   繁体   English

如何将以下 GitHub 项目转换为 deployable.js 文件?

[英]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.

相关问题 如何将此脚本转换为js文件? - How do I convert this script to a js file? 如何将以下内容转换为有效的JSON? - How do I convert the following to a valid JSON? 如何将以下内容转换为if语句? - How do I convert the following to if statements? 如何隐藏普通 HTML/CSS/JS GitHub Pages 项目的数据库连接信息? - How do I hide database connection information for a vanilla HTML/CSS/JS GitHub Pages project? 如何将js文件添加到Titan移动项目 - How do I add a js file to titanium mobile project 如何将以下代码转换为vue js代码? - How can I convert following code to a vue js code? 如何将 CSS 和 JS 文件链接到我的 github 页面的 HTML 文件? - How do I link CSS and JS files to my HTML file for github pages? 如何在 React.js 项目中将类组件转换为功能组件? - How do I convert Class Components to Functional Components in React.js project? API 令牌添加到我的仓库中的 GitHub 机密,部署 GitHub 页面,我如何在 Z9E13B69D7F712DA9327102 中访问此机密? (简单的Node.js项目) - API token added to GitHub Secrets in my repo, deploying GitHub Pages, how do I access this Secret in Javascript? (Simple Node.js project) 如何为node.js编写以下代码? - How do I write the following code for node.js?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM