Skip to content

Commit

Permalink
feat: 添加发布npm脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowings-zy committed Jul 13, 2021
1 parent 2eeef1c commit 350e73f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 5 deletions.
3 changes: 2 additions & 1 deletion demo/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"axios": "^0.21.1",
"easy-file-uploader-client": "^1.0.3",
"file-uploader-client": "file:../../package/fileUploaderClient/dist",
"http-proxy-middleware": "^2.0.1",
"react": "^17.0.2",
Expand Down Expand Up @@ -42,4 +43,4 @@
"last 1 safari version"
]
}
}
}
4 changes: 3 additions & 1 deletion demo/client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useRef, useState } from 'react'
import './App.css'
import { FileUploaderClient } from 'file-uploader-client'
import axios from 'axios'
import { FileUploaderClient } from 'file-uploader-client'
// import { FileUploaderClient } from 'easy-file-uploader-client' //or you can use easy-file-uploader-client on npm


const HOST = 'http://localhost:10001/'

Expand Down
3 changes: 2 additions & 1 deletion demo/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dependencies": {
"@koa/cors": "^3.1.0",
"@koa/multer": "^3.0.0",
"easy-file-uploader-server": "^1.0.3",
"file-uploader-server": "file:../../package/fileUploaderServer/dist",
"koa": "^2.13.1",
"koa-body": "^4.2.0",
Expand All @@ -20,4 +21,4 @@
"multer": "^1.4.2",
"multistream": "^4.1.0"
}
}
}
1 change: 1 addition & 0 deletions demo/server/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const KoaRouter = require('koa-router')
const multer = require('@koa/multer')
const path = require('path')
const { FileUploaderServer } = require('file-uploader-server')
// const { FileUploaderServer } = require('easy-file-uploader-server') // or you can use easy-file-uploader-server on npm

const upload = multer()
const router = KoaRouter()
Expand Down
13 changes: 12 additions & 1 deletion package/fileUploaderClient/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"name": "easy-file-uploader-client",
"version": "1.0.0",
"version": "1.0.3",
"description": "前端通用文件分片上传组件",
"author": "shadowingszy",
"license": "ISC",
"repository": "shadowings-zy/easy-file-uploader",
"main": "dist/index.js",
"keywords": [
"file-upload",
"upload-client"
],
"files": [
"dist/*",
"package.json",
"README.md"
],
"devDependencies": {
"@types/spark-md5": "^3.0.2",
"typescript": "^4.3.4"
Expand Down
13 changes: 12 additions & 1 deletion package/fileUploaderServer/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"name": "easy-file-uploader-server",
"version": "1.0.0",
"version": "1.0.4",
"description": "后端通用文件分片上传组件",
"author": "shadowingszy",
"license": "ISC",
"repository": "shadowings-zy/easy-file-uploader",
"main": "dist/index.js",
"keywords": [
"file-upload",
"upload-server"
],
"files": [
"dist/*",
"package.json",
"README.md"
],
"devDependencies": {
"@types/fs-extra": "^9.0.11",
"typescript": "^4.3.4"
Expand Down
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4418,6 +4418,29 @@ duplexify@^3.4.2, duplexify@^3.6.0:
readable-stream "^2.0.0"
stream-shift "^1.0.0"

easy-file-uploader-client@^1.0.3:
version "1.0.3"
resolved "https://registry.npmjs.org/easy-file-uploader-client/-/easy-file-uploader-client-1.0.3.tgz#2a7ec8676027e690a25073020118766f589d3719"
integrity sha512-UMlnvimSAYfeT4ZatzSMfzdC4xqYPSZZsRad3tP/1h4CkvaYR7PX8jujlDZsbqPeYD5Rp4pquzyhzGQvVbcUEQ==
dependencies:
spark-md5 "^3.0.1"

easy-file-uploader-server@^1.0.3:
version "1.0.3"
resolved "https://registry.npmjs.org/easy-file-uploader-server/-/easy-file-uploader-server-1.0.3.tgz#36aced47d4305fcd7a992da3eba1fb39fd448805"
integrity sha512-1U4zv3r0wrbMrm2+Ok2OmOjY3u95BB2GRYSIXb4xVkzoOBPw3y6WtczXwywoDIh/XnX6W9gXePwd4UKjOGJcqA==
dependencies:
fs-extra "^10.0.0"
multistream "^4.1.0"

easy-file-uploader-server@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/easy-file-uploader-server/-/easy-file-uploader-server-1.0.4.tgz#630e1408a8a76a311302dc0c0b8a53fb9a2718d7"
integrity sha512-uZ2LYYwlgSDt16Nq/mL5V0ZbJfTJytHCraTPOPThK7Qo/WJYDorLbmKWiKNLUiE7vWpCbqEvo9hKXffGW3oJrg==
dependencies:
fs-extra "^10.0.0"
multistream "^4.1.0"

[email protected]:
version "1.1.1"
resolved "https://r.cnpmjs.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
Expand Down Expand Up @@ -10872,6 +10895,8 @@ to-object-path@^0.3.0:
version "0.3.0"
resolved "https://r.cnpmjs.org/to-object-path/download/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
dependencies:
kind-of "^3.0.2"

to-regex-range@^2.1.0:
version "2.1.1"
Expand Down

0 comments on commit 350e73f

Please sign in to comment.