Skip to content

Commit 209a594

Browse files
committed
Update for NPM
1 parent e829e98 commit 209a594

File tree

2 files changed

+72
-11
lines changed

2 files changed

+72
-11
lines changed

README.md

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# vue-file-input
22

3-
Vue.js file input with Drag and Drop support. Mostly for personal use.
3+
Vue.js file input with Drag and Drop support.
44

5-
### Install from GitHub
5+
Mostly for personal use.
66

77
### Demo
88

@@ -20,18 +20,63 @@ globalThis.state = state;
2020
```
2121
This demo is online: https://alttiri.github.io/vue-file-input/
2222

23-
Install the latest version from GitHub directly:
23+
24+
## Installation
25+
26+
### From NPM
27+
28+
```bash
29+
npm install @alttiri/vue-file-input
30+
```
31+
32+
### From GitHub repository
33+
2434
```bash
2535
npm install git+https://github.com/alttiri/vue-file-input.git
2636
```
2737

38+
<details>
39+
40+
<summary>More ways</summary>
41+
42+
### From GitHub repository (a specific version):
43+
44+
- **Based on SemVer:**
45+
```bash
46+
npm install git+https://github.com/alttiri/vue-file-input.git#semver:0.3.0
47+
```
48+
Or add
49+
```
50+
"@alttiri/vue-file-input": "github:alttiri/vue-file-input#semver:0.3.0"
51+
```
52+
as `dependencies` in `package.json` file.
53+
54+
See available [tags](https://github.com/AlttiRi/vue-file-input/tags).
55+
56+
- **Based on a commit hash:**
57+
```bash
58+
npm install git+https://git@github.com/alttiri/vue-file-input.git#c98d3919e9002fa5738680a2c76004fd12746ce3
59+
```
60+
Or add
61+
```
62+
"@alttiri/vue-file-input": "github:alttiri/vue-file-input#c98d3919e9002fa5738680a2c76004fd12746ce3"
63+
```
64+
as `dependencies` in `package.json` file.
65+
66+
See available [commits hashes](https://github.com/AlttiRi/vue-file-input/commits/master).
67+
68+
69+
### From GitHub Packages:
70+
To install you need first to create `.npmrc` file with `@alttiri:registry=https://npm.pkg.github.com` content:
2871
```bash
29-
npm install git+https://github.com/alttiri/vue-file-input.git --save-dev
72+
echo @alttiri:registry=https://npm.pkg.github.com >> .npmrc
3073
```
3174

32-
Also, you can specify a semver with appending, for example, `#semver:0.0.5` to git-URL.
75+
only then run
3376

34-
The same by adding this line in `package.json`'s `dependencies` field:
35-
```json
36-
"@alttiri/base85": "github:alttiri/base85#semver:0.0.5"
77+
```bash
78+
npm install @alttiri/vue-file-input
3779
```
80+
Note, that GitHub Packages requires to have also `~/.npmrc` file (`.npmrc` in your home dir) with `//npm.pkg.github.com/:_authToken=TOKEN` content, where `TOKEN` is a token with the `read:packages` permission, take it here https://github.com/settings/tokens/new.
81+
82+
</details>

package.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
{
2-
"version": "0.2.1",
3-
"type": "module",
42
"name": "@alttiri/vue-file-input",
3+
"version": "0.3.0",
4+
"type": "module",
55
"description": "Vue.js file input with Drag and Drop support.",
6+
"homepage": "https://github.com/alttiri/vue-file-input",
67
"license": "MIT",
78
"main": "./src/file-input/index.ts",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/alttiri/vue-file-input.git"
12+
},
813
"scripts": {
914
"dev": "vite --host",
1015
"build": "vite build",
11-
"serve": "vite preview"
16+
"serve": "vite preview",
17+
"#": "",
18+
"publish-npm": "npm publish --registry=https://registry.npmjs.org",
19+
"publish-ghp": "npm publish --registry=https://npm.pkg.github.com",
20+
"##": "",
21+
"unpublish-npm": "npm unpublish @alttiri/vue-file-input@1.2.3 --registry=https://registry.npmjs.org",
22+
"###": "",
23+
"login-npm": "npm login --registry=https://registry.npmjs.org",
24+
"login-ghp": "npm login --registry=https://npm.pkg.github.com"
25+
},
26+
"publishConfig": {
27+
"access": "public"
1228
},
1329
"devDependencies": {
1430
"@vitejs/plugin-vue": "3.2.0",

0 commit comments

Comments
 (0)