简体   繁体   English

具有Electron的Gulp.js GUI

[英]Gulp.js GUI with Electron

I have been planning to start working on a new application for my current college project. 我一直在计划为我当前的大学项目开发​​新的应用程序。 What I would like to do is create an electron app that will start specific tasks based on a gulpfile.js. 我想做的是创建一个电子应用程序,该应用程序将基于gulpfile.js启动特定任务。

This is mostly to let people start the gulp tasks even if they aren't used to work with the terminal . 这主要是为了让人们启动gulp任务,即使他们不习惯与终端一起工作。

Now the question is: If I package the application (macOS) and the final user don't have any node/gulp.js installed globally, will this work? 现在的问题是:如果我打包应用程序(macOS),并且最终用户没有在全局安装任何node / gulp.js,这行得通吗? Is it possible to package an electron app with gulp and fire some gulp taks anyway? 是否可以用电子枪包装电子应用程序并反击一些电子枪?

I don't have enough time to start the project without knowing if it will work, that's why I'm addressing this to you guys, I need your help in the subject :) 我没有足够的时间来启动该项目,而不知道它是否会工作,所以这就是为什么我要向你们介绍这个问题,在这个问题上我需要您的帮助:)

I have also searched on Google for some solutions, but I didn't find any. 我还在Google上搜索了一些解决方案,但没有找到任何解决方案。

Thank you! 谢谢!

I don't know about gulp in particular, but as it seems to be an npm module, you'll be able to install it locally with your electron app. 我不特别了解gulp,但由于它似乎是一个npm模块,因此您可以使用电子应用程序在本地安装它。 In the terminal cd to your electron/resources/app folder and run 在终端cd到您的electron/resources/app文件夹并运行

npm install gulp-cli -g
npm install gulp -D

(as shown on https://gulpjs.com/ ) (如https://gulpjs.com/所示)

You then should see a node_modules folder in the same directory, which contains the install of gulp. 然后,您应该在同一目录中看到一个node_modules文件夹,其中包含node_modules的安装。 This can then be packaged in the same way as any other electron app. 然后可以用与其他任何电子应用程序相同的方式来打包。

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

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