Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xtheprodev/setup-js
Shareable GitHub Workflow Action to Setup Workspace for JavaScript/TypeScript Projects.
https://github.com/0xtheprodev/setup-js
actions bun github javascript nodejs npm pnpm pnpm-workspaces typescript yarn yarn-berry yarn-workspaces
Last synced: 3 days ago
JSON representation
Shareable GitHub Workflow Action to Setup Workspace for JavaScript/TypeScript Projects.
- Host: GitHub
- URL: https://github.com/0xtheprodev/setup-js
- Owner: 0xTheProDev
- License: gpl-2.0
- Created: 2024-09-17T13:48:54.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-19T10:03:33.000Z (4 months ago)
- Last Synced: 2024-12-25T19:08:03.842Z (8 days ago)
- Topics: actions, bun, github, javascript, nodejs, npm, pnpm, pnpm-workspaces, typescript, yarn, yarn-berry, yarn-workspaces
- Homepage: https://github.com/marketplace/actions/setup-javascript-workspace
- Size: 63.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# action/setup-js
[![License](https://img.shields.io/github/license/0xTheProDev/setup-js?style=for-the-badge&label=license)](https://github.com/0xTheProDev/setup-js/blob/main/LICENSE)
[![Open Issues](https://img.shields.io/github/issues-raw/0xTheProDev/setup-js?style=for-the-badge)](https://github.com/0xTheProDev/setup-js/issues)
[![Closed Issues](https://img.shields.io/github/issues-closed-raw/0xTheProDev/setup-js?style=for-the-badge)](https://github.com/0xTheProDev/setup-js/issues?q=is%3Aissue+is%3Aclosed)
[![Open Pulls](https://img.shields.io/github/issues-pr-raw/0xTheProDev/setup-js?style=for-the-badge)](https://github.com/0xTheProDev/setup-js/pulls)
[![Closed Pulls](https://img.shields.io/github/issues-pr-closed-raw/0xTheProDev/setup-js?style=for-the-badge)](https://github.com/0xTheProDev/setup-js/pulls?q=is%3Apr+is%3Aclosed)
[![Contributors](https://img.shields.io/github/contributors/0xTheProDev/setup-js?style=for-the-badge)](https://github.com/0xTheProDev/setup-js/graphs/contributors)
[![Activity](https://img.shields.io/github/last-commit/0xTheProDev/setup-js?style=for-the-badge&label=most%20recent%20activity)](https://github.com/0xTheProDev/setup-js/pulse)## Description
Github Action to Setup Workspace with appropriate Runtime and Package Manager, along with Project dependencies for JavaScript and TypeScript projects.
## Usage
- **Setup Basic NPM workspace:**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
```- **Setup Specific Node Version (v22.x):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
version: 22.x
```- **Setup Specific Node Version (read from .nvmrc):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
version-file: .nvmrc
```- **Setup Yarn Workspace:**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
cache: yarn
```- **Setup Pnpm Workspace:**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
cache: pnpm
```- **Setup Bun Workspace (only Package Manager):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
cache: bun
```- **Setup Specific Bun Version (v1.x, only Package Manager):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
cache: bun
cache-version: 1.x
```- **Setup Specific Bun Version (read from .bun-version, only Package Manager):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
cache: bun
cache-version-file: .bun-version
```- **Setup Bun Workspace:**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
runtime: bun
```- **Setup Specific Bun Version (v1.x):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
runtime: bun
version: 1.x
```- **Setup Specific Bun Version (read from .bun-version):**
```yaml
---
name: Teston:
push:
branches:
- main
pull_request:
workflow_dispatch:concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: readjobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4- name: Setup Workspace
uses: 0xTheProDev/[email protected]
with:
runtime: bun
version-file: .bun-version
```## Reporting a Bug
Head on to [**Discussion**](https://github.com/0xTheProDev/setup-js/discussions) section to report a bug or to ask for any feature. Feel to add your queries about using this library as well under _Q & A_ section of it. Remember, do not create any Issues by yourself, maintainers of this repository will open one if deemed necessary.
## Changelog
See [CHANGELOG](https://github.com/0xTheProDev/setup-js/blob/main/.github/CHANGELOG.md) for more details on what has been changed in the latest release.
## Contributing
See [Contributing Guidelines](https://github.com/0xTheProDev/setup-js/blob/main/.github/CONTRIBUTING.md).
## License
This project is licensed under the terms of the MIT license, see [LICENSE](https://github.com/0xTheProDev/setup-js/blob/main/LICENSE) for more details.