Skip to content
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

package cannot be used from git #95

Open
dschmidt opened this issue Apr 16, 2020 · 2 comments
Open

package cannot be used from git #95

dschmidt opened this issue Apr 16, 2020 · 2 comments

Comments

@dschmidt
Copy link
Contributor

dschmidt commented Apr 16, 2020

Hey Per,

for starters: thanks for the quick feedback loop in my other ticket/PRs :-)

While I was adjusting the PR according to your feedback, I noticed that it's not possible to simply use an unreleased version of this lib from Github.

There are basically two changes needed because the dist file is obviously missing from this repo (and gladly so, I really dislike compiled code in repositories):

diff --git a/package.json b/package.json
index 11975e6..f7df75d 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
     "url": "git+https://github.com/perarnborg/vuex-oidc.git"
   },
   "main": "dist/vuex-oidc.cjs.js",
-  "module": "dist/vuex-oidc.esm.js",
+  "module": "src/main.js",
   "typings": "index.d.ts",
   "peerDependencies": {
     "oidc-client": ">= 1.6.1",
@@ -60,6 +60,7 @@
   },
   "files": [
     "dist",
-    "index.d.ts"
+    "index.d.ts",
+    "src"
   ]
 }

With those changes in place I can point my package.json to my branch and just use it. It would be nice to be able to do this in general and not depend on a new npm release after a fix has been merged (or even just using an existing PR for the time being).

My proposal is to include this change in the repo and let your release script basically revert the change before uploading to npm.

@perarnborg
Copy link
Owner

OK, let me just read up on this before I make these changes. I will publish the package to npm as soon as I merge the final PR.

@dschmidt
Copy link
Contributor Author

Yep, sure. I'm no expert on that topic either, I just like to be able to point to git revision from package.json :)

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

No branches or pull requests

2 participants