-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import, refactor, improve & yarn support #2
Conversation
tar xzvf ./${name}.tgz -C $out --strip-components=1 | ||
if [ "$installJavascript" = "1" ]; then | ||
cp -R node_modules $out/ | ||
${ concatStringsSep ";" (map (cmd: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is every anything but npm start --scripts-prepend-node-path=true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ever*. I symlinked npm
so it could run the npm start
script, which is somewhat trivial to do (doesn't differ between npm and yarn, afaik)
deps[key] = { name, resolved: url, integrity } | ||
}) | ||
|
||
console.log(JSON.stringify(deps, null, 2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the best way to generate non-log output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? It's less verbose than process.stdout.write(... + "\n")
and does the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantics. console.log is for logs ;)
preInstallPhases = [ "yarnPackPhase" ]; | ||
|
||
# TODO | ||
yarnConfigPhase = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put this in preConfigurePhases
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one.
yarn pack --ignore-scripts --filename ${info.name}.tgz | ||
''; | ||
|
||
installPhase = untarAndWrap info.name [npmCmd yarnCmd]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there's anything here that you can't do with npm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. I'd say it depends on the project. And how well npm works for yarn packages. For the vault ui you'd need neither npm nor yarn after building I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script running is fairly trivial and the code might even be shared between npm and yarn.
preInstallPhases = [ "npmPackPhase" ]; | ||
|
||
npmCachePhase = '' | ||
addToSearchPath NODE_PATH ${npmModules} # pacote |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this add to the final npm build search path as well?
No description provided.