Skip to content

Commit

Permalink
feat(storage): init storage package
Browse files Browse the repository at this point in the history
  • Loading branch information
vfiee committed Jun 25, 2022
1 parent 8d0ae8a commit a2ace7b
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ With CDN

## All Packages

| package | desc |
| ------------- | ------------------------- |
| @vyron/utils | JavaScript utils |
| @vyron/vhooks | Vue composition api hooks |
| package | desc |
| -------------- | ------------------------- |
| @vyron/utils | JavaScript utils |
| @vyron/vhooks | Vue composition api hooks |
| @vyron/storage | Javascript storage utils |

## License

Expand Down
5 changes: 4 additions & 1 deletion docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Not_started ❎
Wip ⛽️
Done ✅
Done ✅

## Todo List

Expand All @@ -16,3 +16,6 @@ Done ✅
| utils | add `isStream isURLSearchParams isFile isBlob isArrayBufferView isFormData` method || 2022-05-19 |
| vhooks | init vhooks(vue-hooks) project || 2022-05-20 |
| utils | add `get set` method || 2022-05-21 |
| storage | init storage package || 2022-06-25 |
| storage | list storage feature || 2022-06-26 |
| | | | |
21 changes: 21 additions & 0 deletions packages/storage/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Vyron

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 43 additions & 0 deletions packages/storage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# @vyron/storage

JavaScript utility functions.

## Install

With npm

```zsh
# npm
npm install @vyron/storage

# yarn
yarn add @vyron/storage

# pnpm
pnpm install @vyron/storage

```

With CDN

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="https://cdn.jsdelivr.net/npm/@vyron/storage@0.1.0/dist/storage.global.js"></script>
<title>storage</title>
</head>

<body>
<script>
console.log(storage)
</script>
</body>
</html>
```

## License

[MIT](./LICENSE)
2 changes: 2 additions & 0 deletions packages/storage/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-empty-function
describe('storage', () => {})
7 changes: 7 additions & 0 deletions packages/storage/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../api-extractor.json",
"mainEntryPointFilePath": "./dist/packages/<unscopedPackageName>/src/index.d.ts",
"dtsRollup": {
"publicTrimmedFilePath": "./dist/<unscopedPackageName>.d.ts"
}
}
5 changes: 5 additions & 0 deletions packages/storage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if (process.env.NODE_ENV === 'production') {
module.exports = require('./dist/storage.prod.cjs.js')
} else {
module.exports = require('./dist/storage.cjs.js')
}
27 changes: 27 additions & 0 deletions packages/storage/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@vyron/storage",
"version": "0.1.0",
"main": "index.js",
"module": "dist/storage.esm.js",
"types": "dist/storage.d.ts",
"globalPackageName": "storage",
"description": "javaScript storage utils",
"keywords": [
"storage",
"javascript",
"typescript"
],
"files": [
"dist",
"LICENSE",
"index.js",
"README.md",
"package.json"
],
"author": "vyron",
"license": "MIT",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
8 changes: 8 additions & 0 deletions packages/storage/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* @Author: vyron
* @Date: 2022-05-19 17:57:31
* @LastEditTime: 2022-06-25 23:45:45
* @LastEditors: vyron
* @Description: 融合汇聚工具类导出
* @FilePath: /utils/packages/storage/src/index.ts
*/

0 comments on commit a2ace7b

Please sign in to comment.