Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

getting component module to be called with --harmony #636

Open
AaronNGray opened this issue Apr 15, 2015 · 4 comments
Open

getting component module to be called with --harmony #636

AaronNGray opened this issue Apr 15, 2015 · 4 comments

Comments

@AaronNGray
Copy link

component-install[.cmd] is auto generated an I cannot seem to be able to get component install to be called from my module via npm install with the --harmony flag set in node.js via an exec.

https://github.com/UKDemocracyOS/app/blob/development/bin/dos-install#L56

as this is calling component via npm and 'node_modules.bin\component-install' I cannot seem to get the contained component-install to run in harmony mode.

@AaronNGray
Copy link
Author

Heres the generated code in 'node_modules.bin\component-install.cmd'

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\..\component\bin\component-install" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node  "%~dp0\..\component\bin\component-install" %*
)

or 'node_modules.bin\component-install'

#!/bin/sh
basedir=`dirname "$0"`

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  "$basedir/node"  "$basedir/../component/bin/component-install" "$@"
  ret=$?
else 
  node  "$basedir/../component/bin/component-install" "$@"
  ret=$?
fi
exit $ret

@timaschew
Copy link
Member

It's quite more easier to run it with iojs, because you don't need any flags for it.

If you really want to stick to node, here is a note how to run component with harmony flag for 0.11 and 0.12
https://github.com/componentjs/development#running-component

@AaronNGray
Copy link
Author

Its more complicated in the app as component is loaded as a node module !

@AaronNGray
Copy link
Author

Tim,

Things seem to be working now both on Windows as well as Linux ! You seem to have made a new master on cogent. I will test again at peak internet activity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants