Reputation: 65
I have a Javascript SDK that is published to NPM. I also have a Vue app that uses the SDK and I need to be able to test them together in different pre-prod environments (e.g. staging). My questions are:
Upvotes: 5
Views: 123
Reputation: 710
You can use the local version of the javascript SDK package (pulled down from a shared devlopment git branch) in your vue app using npm link https://docs.npmjs.com/cli/v7/commands/npm-link
Upvotes: 1
Reputation: 6842
You can use NPM or YARN with Git Directly, so you can create a private repo on your fav Git System and then use username:password@
the URL E.G https://username:[email protected]/git/git.git
so this is private and secured Git that is then used by your dev team.
To then make it public you would pull request into your public Repo and create the npm package from that public repo.
Upvotes: 0
Reputation: 396
You can use a private npm-registry that proxies to npmjs. Checkout https://verdaccio.org/
You can publish your sdk package with tags like dev, stg and in your app use those tagged versions based on env
Upvotes: 2