multiple-scripts-tmux
v1.1.3
Published
## Description
Downloads
23
Readme
multiple-scripts-tmux
Description
This project allows you to conveniently run multiple scripts in separate tmux windows using a simple command in the terminal.
Requirements
- tmux
- npm
Installation
Installing multiple-scripts-tmux using npm:
npm install multiple-scripts-tmux
Install Tmux on Ubuntu and Debian:
$ sudo apt-get install tmux
Install tmux via HomeBrew of OSX:
$ brew install tmux
Running
npx multiple-scripts-tmux "npm run watch:front" "npm run watch:back"
or using tmux-scripts
in your package.json
.
npx multiple-scripts-tmux -p watch
Example Usage in package.json
In your package.json file, you can configure your scripts and define script sets to run in different configurations. Here's an example:
"scripts": {
"watch": "multiple-scripts-tmux -p watch",
"watch:back": "echo 'Watching back-end'",
"watch:front": "echo 'Watching front-end'",
},
"tmux-scripts": {
"watch": [
"npm run watch:back",
"npm run watch:front"
],
},
To execute the scripts defined in the package.json
file, enter the appropriate commands in the terminal. For example:
npm run watch
Running this command launches the correspondingdhc tmux-scripts
Testing
To run tests in the project, follow these steps:
1. Run the watch script:
npm run watch
This script monitors changes in the project's source code and automatically runs tests upon detecting changes. It's a useful tool for continuous testing and ensuring that your code is always checked for potential issues.
2. Navigate to the testing directory:
cd testing/
Navigate to the "testing/" directory, which likely contains testing package.json.
3. Execute the tests:
node ../lib/index.js -p start
This command runs tests using the index.js file located in the "lib" directory.