add-reason icon indicating copy to clipboard operation
add-reason copied to clipboard

Replace postinstall script with link command?

Open nickzuber opened this issue 7 years ago • 0 comments

Proposal

Instead of having the manual and arguably ugly & confusing symlinking postinstall of

node -e \"var s='[src]',d='[dest]',fs=require('fs');if(fs.existsSync(d)===false){fs.symlinkSync(s,d,'dir')};

We can simplify things by just replacing that with add-reason link [src].

Downsides

This means anyone installing a project that uses add-reason will then become dependent on add-reason. This might end up becoming less ideal and more of a hassle in practice.

Benefits

This would be a lot simpler and a lot cleaner. Instead of having to maintain two different implementations of symlinking, we can reduce it down to one (the link command).

Also looks cleaner and is way more clear as to what this postinstall script is doing.

nickzuber avatar Feb 22 '18 00:02 nickzuber