Skip to content

Commit

Permalink
feat: use npm instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tassioFront committed Oct 29, 2024
1 parent 993cb39 commit e968cc2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ It's a monorepo with npm packages, all installable independently
- [storagefy](./packages/storagefy/): LocalStorage helper - [example](https://github.com/tassioFront/frontend-pattern/blob/main/src/helpers/useInfo.ts#L6);
- [http-front-cache](./packages/http-front-cache): Provide a simple and efficient way to cache the results of service functions in the browser;


## Installing utility packages

- create the GITHUB_TOKEN in [personal-access-tokens-classic](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic)
- create a `.npmrc` file in the root of the project with the following content:
```
//npm.pkg.github.com/:_authToken=GITHUB_TOKEN
@open-ish:registry=https://npm.pkg.github.com
```
- install any package you want
NPM packages are available on npmjs.com, so you can install them using npm or yarn and following the anatomy `utility-PACKAGE_NAME`. Ex:

more info in [github docs](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)
```bash
npm i utility-http-front-cache
```

```bash
yarn add utility-storagefy
```
5 changes: 1 addition & 4 deletions packages/storagefy/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"name": "@open-ish/utility-storagefy",
"name": "utility-storagefy",
"version": "0.0.0-semantic-release",
"type": "commonjs",
"repository": {
"type": "git",
"url": "https://github.com/open-ish/utility.git",
"directory": "packages/storagefy"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"main": "src/index.js",
"types": "src/index.d.ts",
"license": "MIT"
Expand Down
5 changes: 1 addition & 4 deletions packages/trycatchfy/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"name": "@open-ish/utility-trycatchfy",
"name": "utility-trycatchfy",
"version": "0.0.0-semantic-release",
"type": "commonjs",
"repository": {
"type": "git",
"url": "https://github.com/open-ish/utility.git",
"directory": "packages/trycatchfy"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"main": "src/index.js",
"types": "src/index.d.ts",
"license": "MIT"
Expand Down

0 comments on commit e968cc2

Please sign in to comment.