https://github.com/brunos3d/npm-scripts-shell-param-expansion
https://github.com/brunos3d/npm-scripts-shell-param-expansion
arg bash npm param scripts shell
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/brunos3d/npm-scripts-shell-param-expansion
- Owner: brunos3d
- Created: 2022-07-12T18:09:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-12T18:46:48.000Z (almost 4 years ago)
- Last Synced: 2025-02-24T17:27:19.108Z (about 1 year ago)
- Topics: arg, bash, npm, param, scripts, shell
- Language: JavaScript
- Homepage: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
- Size: 2.73 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npm-scripts-shell-param-expansion
This is just a study repo about npm scripts and bash parameter expansion, it contains some examples of using env-vars as scripts, it also includes concurrently to run all scripts.
I created it to understand some behaviours of npm scripts and use it with Nx monorepos and heroku
## Start Commands
Running only backend
```bash
PROJECT_NAME=backend npm run start
```
Running only frontend
```bash
PROJECT_NAME=frontend npm run start
```
Running all apps
```bash
npm run start
```
## Build Commands
Building backend
```bash
PROJECT_NAME=backend npm run build
```
Building frontend
```bash
PROJECT_NAME=frontend npm run build
```
Building all apps
```bash
npm run build
```
## Refs
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
https://stackoverflow.com/questions/2013547/assigning-default-values-to-shell-variables-with-a-single-command-in-bash