Giter Site home page Giter Site logo

Comments (9)

s-a avatar s-a commented on July 18, 2024

This goes conform to the current command line description at https://github.com/s-a/iron-node#debug-session. So far there is no mechanism to pass v8 switches via commandline,

Not tried yet but one of this should do the job as described at https://iojs.org/api/v8.html#v8_setflagsfromstring_string:

var v8 = require('v8');
v8.setFlagsFromString('--harmony-arrow-functions');
var flags = require('v8-flags').flags;
flags.harmony_arrow_functions(true);

Available flags are described at: https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md.
But cannot find harmony-arrow-functions and no time today for further research. Can you investigate further?

from iron-node.

cscalfani avatar cscalfani commented on July 18, 2024

Unfortunately, neither worked. And BTW, the name of the flag has underscores not dashes. (That confused me too.)

Any ETA on passing V8 flags via command line?

from iron-node.

s-a avatar s-a commented on July 18, 2024

Not really,
forthcoming feature is a Plugin system which i' m currently testing against a dark ui theme.
From a plugin you could set up such v8 flags if they would work. Have you tried a flag which is listed at https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md?

from iron-node.

s-a avatar s-a commented on July 18, 2024

Seems they solved the problem. Can you try to setup v8 and then requiere your es6 code via separate js file?

electron/electron#2118

from iron-node.

s-a avatar s-a commented on July 18, 2024

@cscalfani I got it
image

I will build something that solves this issue. as a workaround you can put this line into the app ready event.

app.commandLine.appendSwitch('js-flags', '--harmony-arrow-functions');

from iron-node.

s-a avatar s-a commented on July 18, 2024

@cscalfani https://github.com/s-a/iron-node/releases/tag/v1.5.22

Please let us know if this works for you.

from iron-node.

cscalfani avatar cscalfani commented on July 18, 2024

Thank you!!! I'm excited to use this but I have a couple of questions that the docs don't quite answer.

First off, the doc say that on OSX I'm looking for the iron-node directory under ~/Library/Application Support. There's already directory there called iron-node-app. Is this the directory you were referring to or do I need to create the other directory?

Second question, can you provide the example format for the .iron-node.js file (preferably in the documentation so others can benefit from this)?

Thanks again for working so quickly on this.

from iron-node.

s-a avatar s-a commented on July 18, 2024

You need to create the new folder. iron-node-app is some thing electron related. https://github.com/s-a/iron-node/blob/master/.iron-node.js is linked in the docs, but I have just seen that this is not clear enough 👍

from iron-node.

cscalfani avatar cscalfani commented on July 18, 2024

Works!!! Thanks.

from iron-node.

Related Issues (20)

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.