https://github.com/tjx666/check-fe-env
keep a consistent development environment between different developers
https://github.com/tjx666/check-fe-env
Last synced: about 2 months ago
JSON representation
keep a consistent development environment between different developers
- Host: GitHub
- URL: https://github.com/tjx666/check-fe-env
- Owner: tjx666
- License: mit
- Created: 2024-01-16T15:49:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-18T06:39:14.000Z (over 1 year ago)
- Last Synced: 2025-03-13T01:37:08.364Z (about 2 months ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# check-fe-env
keep a consistent development environment between different developers.
will check:
- nodejs version: base on `.nvmrc`
- package manager type and it's version: base on `packageManager` field of package.jsonrecommend using [fnm](https://github.com/Schniz/fnm) to manage nodejs version and [corepack](https://nodejs.org/api/corepack.html) to manage the package manager.
For Chinese users:[前端如何统一开发环境](https://juejin.cn/post/7325069743143878697)
## Usage
Add following to package.json scripts:
```json
{
"scripts": {
"preinstall": "npx check-fe-env"
}
}
```## Related Issues
- [enable corepack by default](https://github.com/nodejs/node/issues/50963)
- [Preinstall script runs after installing dependencies](https://github.com/npm/cli/issues/2660)## Thanks
- [only-allow](https://github.com/pnpm/only-allow) source of inspiration