Giter Site home page Giter Site logo

generator-node-webkit's Introduction

generator-node-webkit

Gitter Build Status Dependency Status devDependency Status NPM version Coverage Status downloads per month current version license open issues Stories in Ready

Required software:

Node.js

Yeoman

To install generator-node-webkit from npm, run:

$ npm install -g generator-node-webkit

Finally, initiate the generator:

$ yo node-webkit

For further informations, please visit our Wiki

We would like to thank

Jim Buck

Andy Matthews

Zack Lalanne

for helping to make it easy to develop cross platform apps.

License

MIT License

generator-node-webkit's People

Contributors

arminhammer avatar cnchanning avatar codingisacopingstrategy avatar commadelimited avatar geksilla avatar gitter-badger avatar jaygray avatar zlalanne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-node-webkit's Issues

Installation Issue

When I try to run the "yo node-webkit" command I get the following error:

ReferenceError: url is not defined
at Object. (C:\Users\thilton\AppData\Roaming\npm\node_modules\gen
erator-node-webkit\app\examples.js:14:30)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\thilton\AppData\Roaming\npm\node_modules\gen
erator-node-webkit\app\index.js:16:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

Executable names for windows

Hi,

I'm not sure if I should regard this as an issue, but nonetheless I would like to share my findings.

I (innocently enough) gave my app a name that has spaces in it, only to find that when I tried to build it (grunt dist-win) an error was thrown:

Running "createWindowsApp" task
The syntax of the command is incorrect.
>> Error: Command failed:
Warning: Task "createWindowsApp" failed. Use --force to continue.

Aborted due to warnings.

So I went ahead and looked into the Grunt.js file. Line 152 is where the error was thrown:

 exec('copy /b tmp\\nw.exe+tmp\\app.nw tmp\\name with spaces.exe && del tmp\\app.nw tmp\\nw.exe', function (error, stdout, stderr) {

Once I removed the spaces, the zip file was created. (although using the original name, because of line 95)

  archive: '<%= config.dist %>/name with spaces.zip'
Running "createWindowsApp" task
tmp\nw.exe
tmp\app.nw
        1 file(s) copied.

Running "compress:finalWindowsApp" (compress) task
Created dist/name with spaces.zip (28903351 bytes)

Done, without errors.

So, I'm not sure what the best way to tackle this is, maybe removing the white spaces (replacing them with another character like '_'), or perhaps alerting the user that this will cause trouble on windows environments.

Anyways, I thought I would share this just in case anyone runs into something similar.

Thanks for the hard work!

grunt dist-* delete old files (all)

When i compile new build, for example:

at first i compile for mac "$ grunt dist-mac", it generate my .dmg file
then, when i compile to windows "$ grunt dist-win", it delete my .dmg file

And i missed something like "$ grunt dist-all" to compile for all platform

Include an option to bundle bower components.

Hey,

This is not quite an issue but I thought I would post it here. It would be great to have a way to have bower deps bundled into the nodebundles. I admit I am new to using grunt so if this is stupid or really easy to do please let me know.

Thanks,

Corruption error installing from npm

There is currently an error when installing via npm:

» npm install –g generator-node-webkit
npm http GET https://registry.npmjs.org/%E2%80%93g
npm http GET https://registry.npmjs.org/generator-node-webkit
npm http 304 https://registry.npmjs.org/generator-node-webkit
npm http 404 https://registry.npmjs.org/%E2%80%93g
npm ERR! 404 '%E2%80%93g' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/tom/.nvm/v0.10.24/bin/npm" "install" "–g" "generator-node-webkit"
npm ERR! cwd /Users/tom
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.23
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/tom/npm-debug.log
npm ERR! not ok code 0

The contents of the error log can be seen here:
https://gist.github.com/subblue/9205131

I don't know if this is an issue with the generator-node-webkit module specifically or something has just got corrupted in the npm registry?

clean:dist task removes everything inside dist folder

When running dist-x, the first clean task removes everything inside the dist folder. This is quite annoying when building for multiple platforms. If I run dist-windows first, then move to Mac and run dist-mac, I lose my first Windows binary.

Angular and node-webkit

I don't know whether this is the right place for it but let me try it. Today, I had a look in my project and think about hm its nice but I want angular. Ok what I tried was copy some other things from an other project but this was horrible then I tried the nicer way, yo angular but this wasn't good because they will overrite things like package.json, bower.json and gruntfile.js. Package and bower is ok, I can copy it to a temp file (only a workaround) but gruntfile will be horrible. So is it possible to merge the nice angular template together with node-webkit as a new one like angular-node-webkit or smth like that? That would be great :)

Regards

Chris

EPERM error for Linux package.

When I try to install the generator and want to use all packages (Linux, Mac, Windows), after downloading I got an error for the Linux package. See the screenshot for more infos please.
generatorerror

I use Windows 7 64bit.

Regards

Chris

Empty resource folder

I was having an issue generating a windows exe from my first node-webkit project. grunt dist-win is failing because the resources/Windows folder is empty. There is nothing to copy into /tmp/.

creating a new project i see the generator runs into an issue I missed generating my first project.

? Node-webkit for Windows downloaded
? Node-webkit for MacOS downloaded
? Node-webkit for Linux32 downloaded
? Node-webkit for Linux64 downloaded
   info Unzip MacOS files.
   info Un.tar.gz Linux64 files.
   info Un.tar.gz Linux32 files.
   info Unzip Windows files.

events.js:72
        throw er; // Unhandled 'error' event
          ^
Error: incorrect header check
    at Zlib._binding.onerror (zlib.js:295:17)

am i missing a module for the generator to work? or any suggestions to what I should look at next?

Updating this with the information as i get it.

Lazy load node-webkit

The idea is to download automatically only the node-webkit version which is required for dev on current system.
e.g. Developing on mac will download the mac version of node-webkit
Afterwards at the dev stage, calling grunt dist-win check for availability of the windows version of node-webkit. If not present ask to download.

Generator error : "conflict Wrong content type for Linux64"

I got a strange error, trying to initialize a nw project (and testing if I can build a linux version under OSX) :

I told Yeoman to download the 3 versions of NW, and I got this error : "conflict Wrong content type for Linux64" during the attempt to get the L64 version.

The generator finished in a broken state (missing folder, node dependencies not installed...)

GruntFile .js createLinuxApp task with wrong routes on Linux 64

When installing the latest node-webkit the route to nw.pk is
resources/node-webkit/Linux64/node-webkit-v0.9.2-linux-x64/
but in GruntFile.js it is defined as
resources/node-webkit/linux_ia64
so running createLinuxApp or dist dist-linux will return an error.

Generator doesn't create usable project

After running the generator I'm left with the following structure in the app directory

DirectoryName
----app
--------img
----resources
--------node-webkit

This is running on OSX with the latest Yeoman and NodeJS installed

Target flag for build task

The problem:
With the current folder structure it is not possible to eg. use git or yeoman to build an app. Especially with yeoman we run in the situation that Gruntfile and package.json will be overwritten.

Possible solution:
Add a target flag to the build task. grunt dist-mac --app "/app/<myAppFolder>"
With this flag it is possible to use own folder structure within the app folder.

Current folder structure:

<project root>
| - app
| -   | - js
| -   | - css
| -   | - packages.json
| - resources
...
$grunt dist-mac

Will copy all content of the app folder to build a nw app.

Examples:

<project root>
| - app
|     | - <myapp>
|     |         | - css
|     |         | - js
|     |         | - package.json
|     |  - node-modules
|     |  - Gruntfile.js
| - resources
...
$grunt dist-mac --app "app/<myapp>"

Now we can use other tools to setup an app structure.
E.g. use git clone or yo angular inside the app folder and the app will build with the <myapp> folder as project.

node_modules directory not being imported

I'm in the process of building an application which uses 3rd party node modules. In this case I'm specifically using one for the application itself, a library to convert Excel files to JSON. Each time I tried to build for Mac OSX (my single target platform) I got the following error on a coworkers machine when he tried to run it:

Error: Cannot find module 'xls-to-json'
    at Function.Module._resolveFilename (module.js:334:15)
    at Function.Module._load (module.js:273:25)
    at Module.require (module.js:360:17)
    at require (module.js:376:17)
    at window.require (eval at undefined, <anonymous>:1:112)
    at eval (file:///Users/<username>/Downloads/Directory.app/Contents/Resources/app.nw/js/utils.js:22:16)
    at eval (file:///Users/<username>/Downloads/Directory.app/Contents/Resources/app.nw/js/utils.js:13:22)
    at eval (file:///Users/<username>/Downloads/Directory.app/Contents/Resources/app.nw/js/utils.js:15:2)

After reading through the docs it turns out the reason why this was happening was because the node_modules directory in the root of the project was not being included in the final package. I'm submitting a pull request to update the Mac portion of this repo. I don't have any way of testing the Linux or Windows versions.

Sharing a node-webkit app on github

Hello, it's more a question than an issue.

I want to share on github a little app done with generator-node-webkit.

During yeoman steps, github information is asked and is used to populate the project's root package.json. Maybe it would be better to use this info to populate the example app's
package.json ?

I don't see a real value committing the root project (with /ressources and /tmp containing node-webkit archives). I think I'll want to only commit the /app folder content and to add build instructions (for those interested). Build instructions would mention using node-webkit-generator and cloning the project in the /app folder.

How do you see this ?

Warning: Task "server" not found. Use --force to continue

I am getting error when I try grunt server command.
I did the following to start a basic node-webkit project
npm install -g yo
npm install -g generator-node-webkit
cd C:\yeoman\test1
yo node-webkit
Selected all the options required for windows.
grunt server
failed with Task "server" not found. Use --force to continue

automate libudev.so.0 to libudev.so.1

I know of this error on linux (I run ubuntu 14.04 64 bit) with libudev.so.0 cannot be found.

One solution is to use ghex to change "libudev.so.0" to "libudev.so.1".

But this means the auto build with "grunt dist-linux" still needs manual changing of the "node-webkit" binary to "libudev.so.1".

Is there any soluton to this problem (it breaks the flow)

yo node-webkit Error!

I make a new directory and excute yo node-webkit. At first, it works well, when download node-webkit for Linux64, it abort and alert the fellow error.
image
After that, I checked my project directories. app/ and resources/ are all empty. tmp/ contains the node-webkit packet. What's wrong? How could I solve it? I'm working on Ubuntu 14.04 LTS with yeoman version 1.2.0

Error on unzipping windows binaries.

When I come to the point: Which platform do you wanna support and I choose only windows, I see this:

[?] Which platform do you wanna support? Windows
info Get GitHub informations
✔ Github informations successfully retrieved.
✔ Node-webkit for Windows already downloaded
info Unzip Windows files.
conflict Error while unzipping "tmp/Windows.zip" [Error: Could not find the End of Central Directory Record]

Regards

Chris

Error while installing

I cannot install module globally, that's error output:

npm install –g generator-node-webkit
npm http GET https://registry.npmjs.org/%E2%80%93g
npm http GET https://registry.npmjs.org/generator-node-webkit
npm http 404 https://registry.npmjs.org/%E2%80%93g
npm http 304 https://registry.npmjs.org/generator-node-webkit
npm ERR! 404 '%E2%80%93g' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "–g" "generator-node-webkit"
npm ERR! cwd /Users/dmitri
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/dmitri/npm-debug.log
npm ERR! not ok code 0

Efficient Development Workflow?

What's the easiest way to develop a nw application using this generator? Do you still use a global instance of node-webkit to run the app during the development phase?

I'm currently running grunt dist-mac to rebuild the mac app, then quitting and rerunning the application. Is there a more efficient workflow you recommend?

I can not generate the project node-webkit ....

$ node -v
v0.10.29

$ npm -v
1.5.0-alpha-4

$ yo -v
1.2.0

$ sudo npm install -g generator-node-webkit

[email protected] /usr/local/lib/lib/node_modules/generator-node-webkit
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

$ yo node-webkit   
Error node-webkit 

You don't seem to have a generator with the name node-webkit installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 28 registered generators run yo with the `--help` option.

What did might be happening?
Can anyone help me solve? :(

Thank you.

Error: ENOENT, unlink 'tmp/nw.exe' when generating Windows distribution

When I run 'grunt dist-win', I get the following error, which results in the distribution failing to build (even when forced):

Running "createWindowsApp" task

Error: ENOENT, unlink 'tmp/nw.exe'

It looks like this is a file that is created during the build process, so I'm not sure I have any way to resolve it. Can you help?

The mac distribution builds just fine. Thank you very much.

Error trying to run app from dist

Running grunt dist-linux I've this output:

[8158:1105/101754:FATAL:content_main_runner.cc(751)] Check failed: base::i18n::InitializeICU().
[1] 8158 abort (core dumped) ./node-webkit

System: Linux 3.17.2-1 x86_64
Generator: Node-webkit generator 1.0.2

Thanks.

Dead node-webkit link.

https://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-* is returning an XML file (NoSuchKey), ergo an 'Wrong content type' error occurs.

E.g.
https://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-osx-ia32.zip

Link is deprecated:

this.nodeWebkitBaseUrl = 'https://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-';

Currently working solution:

this.nodeWebkitBaseUrl = 'http://dl.node-webkit.org/v0.9.2/node-webkit-v0.9.2-';

*Note
Use http instead of https?

request module missing

Using yo to install webkit generator completes. However running it requires "request" which was not installed by yo (at least on my Mac it did not).

I solved it by running:
sudo npm install -g request

After that it would run.

issue when running dist application on ubuntu 64

I just did "grunt dist-linux", then moved the files from my darwin to linux, and then when trying to execute i get this error message

./node-webkit 
[2159:1120/165651:ERROR:icu_util.cc(149)] Couldn't mmap /home/beaglert/Desktop/Linux64/icudtl.dat
[2159:1120/165651:FATAL:content_main_runner.cc(716)] Check failed: base::i18n::InitializeICU(). 
Aborted (core dumped)

Am i supposed to build the linux dist on a linux computer ?

Shall I try use a different version of node-webkit bin ?

delete buildTmp after building?

After building for mac/win/linux i get this empty folder on my project folder.

Perhaps it should be deleted after building?

Some question

Hi,
I'm working on Mac and I want to create an app for Mac et Windows. Is there a way to build a distrib package for Windows on Mac just like grunt-node-webkit-builder does ? It's boring to have to switch OS only for build the package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.