Closed sagarrbatchu closed 4 years ago
Thinking, will reply again later today. Nice job.
Pushed some changes
This is probably good to go now, although decent change I missed something. Need to add some short instructions to the README for how to install globally.
Basically you need to get a Github token for installing packages, then setup your global .npmrc file. ~/.npmrc
looks like this:
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN}
@liveramp:registry=https://npm.pkg.github.com/
Then you can install reslang globally with
yarn global add @liveramp/reslang
Needed to change the name to @liveramp/reslang
because Github Packages requires the package to be prefixed with the org name. If this is a dealbreaker, we can figure something else out. Same thing with changing bin
in package.json
and removing the ts-node
shebang from main.ts
. Let me know.
After installing globally, you can run it with reslang
from anywhere. You get proper handling of relative paths passed to reslang
for free.
The rollup file is basically just copied from our Customer Profiles apps. It works, and it's not long or confusing, so I didn't bother tweaking it.
Note: I removed the ts-node
shebang because for whatever reason it broke the rollup
build. That's dumb, but I guessed that instead of investigating, we could do just fine without the shebang.
Small quality of life improvement to install
reslang
as a versioned package. Any dev can then runnpm install @liveramp/reslang@01.4.2
to have available globally on their path. Thanks Mike for the idea !If this is a thumbs up I'll run
npm version 1.4.2
to set the version inpackage.json
and then runnpm publish
to publish it under https://github.com/orgs/LiveRamp/packages . Since this is a private repo the package maintains the same scopes, you will have to be a member of the LiveRamp org with read permissions on thereslang
repo to install it as a binary.