Git Product home page Git Product logo

electron's People

Contributors

jasonrm avatar logicalparadox avatar robertwhurst 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

Watchers

 avatar  avatar  avatar  avatar

electron's Issues

Incorrect handling of boolean values from a native (node-gyp built) module

I've created a sample node-gyp project that returns boolean true/false values. It works as expected running under node, but when run under electron-prebuilt the values are incorrectly interpreted.

A sample project can be found here: https://bitbucket.org/kwaaioak/electron-test

Here's the substance of what I'm doing...

In C++:
attributes->Set(Nan::New("should_be_true").ToLocalChecked(), Nan::Newv8::Boolean(true));
attributes->Set(Nan::New("should_be_false").ToLocalChecked(), Nan::Newv8::Boolean(false));

When run under node:
should_be_true = (boolean)true
should_be_false = (boolean)false

When run under electron:
should_be_true = (boolean)false
should_be_false = (string)

This doesn't seem like it should be an Electron issue, but starting here anyway.

$ node -v
v6.2.0

$ node-gyp -v
v3.3.1

$ ./node_modules/.bin/electron -v
v1.2.5

The results are the same whether I'm using electron or electron-prebuilt

argv param enhancements

  • should record all params and convert result to array
  • when gathering from multiple params: argv.param('f', 'formatters')
    • should combine all specified into an array

/cc @vesln

New package name

What's the new package name after electron has been given to atom-shell?

Documentation Site is down | Using electron with nightmareJS

Approaching the second quarter of 2016 and the documentation site appears to have been down for about 6 months, judging from the dates of the other two reported issues about the site being down.

I was hoping to find out more about this project because it's a core dependency in nightmareJS. I'm running nightmareJS on a linux ec2 server and electron doesn't appear to be compatible with linux.

I'm going to try to follow the instructions here and see if I get anywhere.

If I find a fix I'll post what I did, here.

process.env.ELECTRON_COV

Hello, for some reason when I installed electron package (I'm calling electron from the UI with web pack because I need to execute an ipcRendered event) now I'm getting this error when I run web pack.

ERROR in ./~/electron/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib-cov/electron in /Users/gonzalo/Documents/Bitbucket/Desktop/node_modules/electron
 @ ./~/electron/index.js 4:4-33

ERROR in ./~/electron/~/drip/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib-cov/drip in /Users/gonzalo/Documents/Bitbucket/Desktop/node_modules/electron/node_modules/drip
 @ ./~/electron/~/drip/index.js 2:4-29

ERROR in ./~/electron/~/drip/~/tea-concat/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib-cov/concat in /Users/gonzalo/Documents/Bitbucket/Desktop/node_modules/electron/node_modules/drip/node_modules/tea-concat
 @ ./~/electron/~/drip/~/tea-concat/index.js 2:4-31

This is because for some reason process.env.ELECTRON_COV is true...

Thanks

Default values are parsed, but not made available?

Test Script

program = require('electron')('triton')

program
    .name('Triton')
    .version('1.0.0')

program
    .command('server')
    .desc('Start Web Server')
    .option('-p, --port [8888]', "HTTP Port")
    .option("-d, --directory [/var/www]", "Root Directory")
    .action (argv) ->
        console.log
            port: argv.param('p', 'port')
            directory: argv.param('d', 'directory')

program.parse()

Expected

$ coffee triton.coffee server
{ port: 8888, directory: '/var/www' }

Actual

$ coffee triton.coffee server
{ port: null, directory: null }

Notes

I see that lib/electron/command.js does parse the default value, however it doesn't appear to be exposed anywhere.

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.