node-webkit

Convert Node js project to Executable file

六眼飞鱼酱① 提交于 2020-12-29 04:52:31
问题 I have created Node js project, but my client requirement is to get its exe file so that he can run it without installing node. Kindly help me to create node.js project into its executable file i.e exe file. 回答1: I think that you have already solved your problem, but the question is not marked as resolved. You can use a packer, I prefer to use BoxedApp Packer. This program can "convert" your Node js application into an executable file. You just have to start the packer, select the file with

Is it possible to block remote scripts from loading inside iframe?

五迷三道 提交于 2020-07-21 03:02:11
问题 I am creating iframes dynamically and I want to prevent scripts that don't originate from the iframes' origin. Is this even possible (via JavaScript/jQuery)? For example, if my page loads an iframe from example.com with the contents: <script src="http://example.com/foo.js"></script> <script src="http://something-else.com/bar.js"></script> I want the example.com script to run, but I want the something-else.com script to be blocked and not run. I am using NW.js (formerly Node-Webkit), so I have

Is it possible to block remote scripts from loading inside iframe?

北城以北 提交于 2020-07-21 03:01:25
问题 I am creating iframes dynamically and I want to prevent scripts that don't originate from the iframes' origin. Is this even possible (via JavaScript/jQuery)? For example, if my page loads an iframe from example.com with the contents: <script src="http://example.com/foo.js"></script> <script src="http://something-else.com/bar.js"></script> I want the example.com script to run, but I want the something-else.com script to be blocked and not run. I am using NW.js (formerly Node-Webkit), so I have

node-webkit设置程序开机启动

我只是一个虾纸丫 提交于 2020-04-12 14:03:35
上一篇写了打包脚本中设置安装时开机启动,这一篇写由node.js来控制程序是否随windows系统开机启动. 首页在项目package.json中加入对windows-shortcuts的引用(手动下载地址https://github.com/j201/windows-shortcuts) "dependencies": { "windows-shortcuts":"*" } 在 npm install windows-shortcuts,加入快捷方式的第三方包.再判断系统,根据系统生成启动目录地址,最后用window-shortcuts生成快捷方式,在启动目录创建成功后就能开机启动了. var shortcut = require('windows-shortcuts'); var fs=require("fs"); //windows下的开机启动 if(process.platform.match(/^win/)){ //开机启动目录 var startupMenu=""; //APPDATA目录中有Roming的是win7,win8等同类系统开机目录 if(/Roaming/.test(process.env.APPDATA)){ startupMenu=process.env.APPDATA+"\\Microsoft\\Windows\\Start Menu\

Node-webkit 资料笔记

南笙酒味 提交于 2020-03-31 04:09:14
  静不下心写学习笔记了,因为发现了这篇文章:《 用node-webkit开发多平台的桌面客户端 》   另外 官网 上针对“package.json”的配置参数也已经很详尽了,连我英文不好的也差不多能看懂个大概,再配合谷歌娘的翻译,八九不离七了。   这里还有个 PPT ,一样可以快速入门。   最后关于封装,我补充一个测试出来的问题:   因为最后打包好的exe文件,依旧需要对应*.dll和nw.pak文件放在同目录下才能打开,如果只拷贝了exe文件,是无法打开。   作者在《 How to package and distribute your apps 》最后一段提到,可以使用Enigma Virtual Box这个软件,将exe与那些dll还有nw.pak文件封装,生成一个新的exe文件,就可以独立运行了。   我测试后发现win7,win8都是正常,但在win8.1下就无法打开了。 来源: https://www.cnblogs.com/hooray/p/3344309.html

web前后端 技术栈

大城市里の小女人 提交于 2020-03-05 15:16:31
1、 Jenkins 是一个开源软件项目,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能。 2、 Vagrant 是一个基于Ruby的工具,用于创建和部署虚拟化开发环境。它 使用Oracle的开源 VirtualBox 虚拟化系统,使用 Chef创建自动化虚拟环境。 3、 Apache MINA 是一个网络应用程序框架,用来帮助用户简单地开发高性能和高可扩展性的网络应用程序。它提供了一个通过 Java NIO在不同的传输例如TCP/IP和UDP/IP上抽象的 事件驱动 的异步API。 4、 Gollum 是 Git 上面 wiki 系统的构造工具,简单实用。Gollum wikis 是简单的 Git 库,遵循特定的格式。Gollum 上面允许使用多种格式,有多种编辑的方式。 5、 React 是一个 Facebook 和 Instagram 用来创建用户界面的 JavaScript 库。很人多认为 React 是 MVC 中的 V (视图)。 6、 Redux 是应用状态管理服务。虽然本身受到了 Flux 很深的影响,但是其核心概念却非常简单,就是 Map/Reduce 中的 Reduce。 7、 Webpack 是一款专为Web开发设计的包管理器。它能够很好地管理、打包Web开发中所用到的HTML、Javascript、CSS以及各种静态文件(图片、字体等)

how to write file with node webkit js?

笑着哭i 提交于 2020-03-05 12:51:17
问题 When I build my app, 'fs' module doesn't work. So, it must write file, but when I start my app nothing happens. But if I start my app with: $ /path/to/app nw It works correctly. What's wrong? Some code, where I use fs: function check_prob_2(){ console.log('Problem 2'); fs.appendFile('log.txt', 'Checking problem 2: \n\n'); ... } I use that function, but it doesn't work. It doesn't work only after build application. I build it with this guide 回答1: Try this: Include the following (standard)

how to write file with node webkit js?

ぐ巨炮叔叔 提交于 2020-03-05 12:50:31
问题 When I build my app, 'fs' module doesn't work. So, it must write file, but when I start my app nothing happens. But if I start my app with: $ /path/to/app nw It works correctly. What's wrong? Some code, where I use fs: function check_prob_2(){ console.log('Problem 2'); fs.appendFile('log.txt', 'Checking problem 2: \n\n'); ... } I use that function, but it doesn't work. It doesn't work only after build application. I build it with this guide 回答1: Try this: Include the following (standard)

how to write file with node webkit js?

ぃ、小莉子 提交于 2020-03-05 12:50:07
问题 When I build my app, 'fs' module doesn't work. So, it must write file, but when I start my app nothing happens. But if I start my app with: $ /path/to/app nw It works correctly. What's wrong? Some code, where I use fs: function check_prob_2(){ console.log('Problem 2'); fs.appendFile('log.txt', 'Checking problem 2: \n\n'); ... } I use that function, but it doesn't work. It doesn't work only after build application. I build it with this guide 回答1: Try this: Include the following (standard)

get execFile stdOut on chunks

限于喜欢 提交于 2020-02-04 08:40:26
问题 I am trying to use execFile and log the stdOut that gives the percentage done on the task, but the callback function: var child = require('child_process'); child.execFile("path/to/the/file", options, function (error, stdout, stderr) { console.log('stdout: ' + stdout); }); Waits until the process is done and then logs everything at once. How do i get the info while is being processed and log it in parts?, I have try this: child.stdout.on('data', function (data) { console.log(data); }); But i