Skip to content

Commit

Permalink
chore: use pnpm instead of yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Oct 10, 2024
1 parent 22eed80 commit a6df174
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Thank you for contributing to sheikah! :)
- [ ] I have read and understood [CONTRIBUTING][cont] document.
- [ ] I have read and understood [STYLEGUIDE][style] document.
- [ ] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't.
- [ ] My code is formatted and is accepted by `yarn lint`.
- [ ] My code is formatted and is accepted by `pnpm lint`.
- [ ] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.**

# Why this change is necessary and useful
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,47 +35,47 @@ git clone [email protected]:witnet/sheikah.git
cd sheikah

# install application dependencies
yarn
pnpm install

# launch development application
yarn electron:serve:wallet
pnpm dev
```

### Formatter

- Verify files are correctly formatted with `yarn lint`
- Repair lint errors with (**this operation modifies your files!**) `yarn lint!`
- Verify files are correctly formatted with `pnpm lint:check`
- Repair lint errors with (**this operation modifies your files!**) `pnpm lint`

### Test

We use [Jest](https://facebook.github.io/jest/) for testing.

```bash
# run unit tests
yarn test
pnpm test
```

### Build

#### Production

To build the application run: `yarn electron:build`, the build files are written to `dist_electron` directory.
To build the application run: `pnpm build`, the build files are written to `dist_electron` directory.

### Contributing

You can read the [contributing guide](https://github.com/witnet/sheikah/blob/master/.github/CONTRIBUTING.md)

#### Github Actions (continuous integration)

When opening a pull request a job in [Github Actions](https://github.com/features/actions) will be fired off to check the changes. To avoid wasting time waiting for Github Actions output we provide the command `yarn ci` that will perform almost the same checks but it'll run in your computer.
When opening a pull request a job in [Github Actions](https://github.com/features/actions) will be fired off to check the changes. To avoid wasting time waiting for Github Actions output we provide the command `pnpm ci` that will perform almost the same checks but it'll run in your computer.

#### Troubleshooting

- Use `yarn clean` to remove the contents of the build directory (`dist_electron`)
- Use `yarn clean-deps` to remove all installed dependencies
- Use `yarn reinstall` to remove all installed dependencies and install them again
- Use `pnpm clean` to remove the contents of the build directory (`dist_electron`)
- Use `pnpm clean-deps` to remove all installed dependencies
- Use `pnpm reinstall` to remove all installed dependencies and install them again

If the application doesn't boot correctly and no error is reported in the terminal, try running `yarn reinstall` and try again.
If the application doesn't boot correctly and no error is reported in the terminal, try running `pnpm reinstall` and try again.

## Release

Expand Down
10 changes: 5 additions & 5 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
'*.js': ['yarn lint:eslint', 'yarn lint:prettier'],
'*.js': ['pnpm lint:eslint', 'pnpm lint:prettier'],
'{!(package)*.json,.!(browserslist)*rc}': [
'yarn lint:prettier --parser json',
'pnpm lint:prettier --parser json',
],
'package.json': ['yarn lint:prettier'],
'*.vue': ['yarn lint:eslint', 'yarn lint:stylelint', 'yarn lint:prettier'],
'*.scss': ['yarn lint:stylelint', 'yarn lint:prettier'],
'package.json': ['pnpm lint:prettier'],
'*.vue': ['pnpm lint:eslint', 'pnpm lint:stylelint', 'pnpm lint:prettier'],
'*.scss': ['pnpm lint:stylelint', 'pnpm lint:prettier'],
}
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
"dev": "vite",
"build": "vue-tsc --noEmit && vite build && electron-builder",
"preview": "vite preview",
"test": "yarn test:unit",
"lint": "yarn lint:fix:eslint && yarn lint:fix:prettier",
"ci": "yarn lint:check && yarn test && yarn electron:build --publish=never",
"clean": "yarn clean-deps && rm -rf dist_electron",
"test": "pnpm test:unit",
"lint": "pnpm lint:fix:eslint && pnpm lint:fix:prettier",
"ci": "pnpm lint:check && pnpm test && pnpm electron:build --publish=never",
"clean": "pnpm clean-deps && rm -rf dist_electron",
"clean-deps": "rm -rf node_modules",
"electron:build": "vue-cli-service electron:build",
"electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten",
"electron:serve": "vue-cli-service electron:serve",
"electron:serve:wallet": "vue-cli-service electron:serve --wallet",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|ts|vue)' --locales './src/locales/**/*.json'",
"lint:check": "yarn lint:check:eslint && yarn lint:check:prettier",
"lint:check:eslint": "yarn lint:eslint --ext .js,.ts,.vue .",
"lint:check:prettier": "yarn lint:prettier --check \"**/*.{ts,js,json,css,scss,vue,html}\"",
"lint:check": "pnpm lint:check:eslint && pnpm lint:check:prettier",
"lint:check:eslint": "pnpm lint:eslint --ext .js,.ts,.vue .",
"lint:check:prettier": "pnpm lint:prettier --check \"**/*.{ts,js,json,css,scss,vue,html}\"",
"lint:eslint": "eslint",
"lint:fix:eslint": "yarn lint:eslint --fix --ext .js,.ts,.vue .",
"lint:fix:prettier": "yarn lint:prettier --write \"**/*.{ts,js,json,css,scss,vue,html}\"",
"lint:fix:eslint": "pnpm lint:eslint --fix --ext .js,.ts,.vue .",
"lint:fix:prettier": "pnpm lint:prettier --write \"**/*.{ts,js,json,css,scss,vue,html}\"",
"lint:prettier": "prettier --loglevel warn",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps",
"reinstall": "yarn clean-deps && yarn",
"reinstall": "pnpm clean-deps && pnpm",
"test:unit": "vitest"
},
"main": "dist-electron/main/index.js",
Expand Down

0 comments on commit a6df174

Please sign in to comment.